JTrumpfheller
Programmer
Hy people,
my first q: here and hope to get an answer.
I defined a template in word with a lot of fields and selfdefined docvariables.
In the maindocument I can set the values like this:
ActiveDocument.Variables(WhichField).Value = WhichValue
After I have set every value I can say:
ActiveDocument.Fields.Update
And I can see the result as I wanted it.
In the footer area I also have defined fields and docvariables but I have no idea how to update the fields so that the new item.values are shown. I can write the values with this:
With ActiveDocument.sections(1).Footers _
.Item(wdHeaderFooterFirstPage).Range
.Document.Variables(WhichField).Value = WhichValue
End With
But how to update/refresh it?
To do it manually I have to open the Header/Footer area - select the special field - right mouse - edit field - Ok and then the new value is shown. But how can I do it via vba?
To record a makro is not useful because you can not use the mouse and I didn't find the right mouse context menu in the main menu.
Thanks Joerg
my first q: here and hope to get an answer.
I defined a template in word with a lot of fields and selfdefined docvariables.
In the maindocument I can set the values like this:
ActiveDocument.Variables(WhichField).Value = WhichValue
After I have set every value I can say:
ActiveDocument.Fields.Update
And I can see the result as I wanted it.
In the footer area I also have defined fields and docvariables but I have no idea how to update the fields so that the new item.values are shown. I can write the values with this:
With ActiveDocument.sections(1).Footers _
.Item(wdHeaderFooterFirstPage).Range
.Document.Variables(WhichField).Value = WhichValue
End With
But how to update/refresh it?
To do it manually I have to open the Header/Footer area - select the special field - right mouse - edit field - Ok and then the new value is shown. But how can I do it via vba?
To record a makro is not useful because you can not use the mouse and I didn't find the right mouse context menu in the main menu.
Thanks Joerg