<font color='black' size='2' face='arial'>
<div style="MARGIN: 0in 0in 0pt" class=MsoNormal>Hello!</div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal>&nbsp;</div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri><FONT face=Arial><FONT size=2>Has anyone bumped into this before?</FONT>&nbsp;&nbsp;</FONT>&nbsp;<FONT face="Arial, Helvetica, sans-serif">I</FONT> have a Perl script <FONT size=2><FONT face="Arial, Helvetica, sans-serif">that</FONT> <FONT face="Arial, Helvetica, sans-serif">basically</FONT> </FONT>does what I want it to do which is to seek the current page header, select all, then do an update, which updates the display in the header of the document to display the value of a DocProperty field.&nbsp; That part of the code looks like this:</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>$word_app-&gt;ActiveWindow-&gt;ActivePane-&gt;View-&gt;{Type} = wdPrintView;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>$word_app-&gt;ActiveWindow-&gt;ActivePane-&gt;View-&gt;{SeekView} = wdSeekCurrentPageHeader;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>$word_app-&gt;Selection-&gt;WholeStory;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>$word_app-&gt;Selection-&gt;Field-&gt;Update;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>Now, the problem is that many Word Documents have more than one Section, so I’m now trying to loop this to go through and update every section.&nbsp; The above code only updates the first section of the document so… now I’m doing:</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>My $sections = $doc-&gt;Sections-&gt;Count();</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>$word_app-&gt;ActiveWindow-&gt;ActivePane-&gt;View-&gt;{Type} = wdPrintView;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>For ($i=1; $i&lt;=$sections; $i++){</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>&nbsp;&nbsp; #Macro to translate:&nbsp; Selection.GoTo What:=wdGoToSection, which:=wdGoToNext, Count:=1, Name:=””</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>&nbsp;&nbsp;&nbsp;#Next line is an attempt to translate but it is NOT working</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>&nbsp;&nbsp; $word_app-&gt;ActiveWindow-&gt;Selection-&gt;GoTo(“wdGoToSection”, “wdGoToNext”, 1, 0);&nbsp; </FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>&nbsp;&nbsp; $word_app-&gt;ActiveWindow-&gt;ActivePane-&gt;View-&gt;{SeekView} = wdSeekCurrentPageHeader;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>&nbsp;&nbsp; $word_app-&gt;Selection-&gt;WholeStory;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>&nbsp;&nbsp; $word_app-&gt;Selection-&gt;Field-&gt;Update;</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>}</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>Do you have any ideas that would help me out??&nbsp; </FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>Thanks so much!</FONT></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><o:p><FONT size=3 face=Calibri>&nbsp;</FONT></o:p></div>


<div style="MARGIN: 0in 0in 0pt" class=MsoNormal><FONT size=3 face=Calibri>Mark</FONT></div>
<br>
<br>


<div style="CLEAR: both"></div>
</font>