I have a Word document containing the fields [Page] and [NumPages] to create [X of Y pages]. During automation I create one or more pages, so at the end I want to update the fields.
Updating field [Page] works fine.
Updating field [NumPages] does not work.
I have the following code:
*-- First repaginate, don't do this in background
this.oWord.options.pagination = .f.
this.oDocNew.repaginate
*-- Now update fields, if any
if this.oDocNew.fields.count>0
for i=1 to this.oDocNew.fields.count
this.oDocNew.fields(i).update
endfor
endif
How can i get [NumPages] to work?
Thanks for any reply.
André
Updating field [Page] works fine.
Updating field [NumPages] does not work.
I have the following code:
*-- First repaginate, don't do this in background
this.oWord.options.pagination = .f.
this.oDocNew.repaginate
*-- Now update fields, if any
if this.oDocNew.fields.count>0
for i=1 to this.oDocNew.fields.count
this.oDocNew.fields(i).update
endfor
endif
How can i get [NumPages] to work?
Thanks for any reply.
André