Closed kristofferjalen closed 1 year ago
This is how the fields work, as far as I understand. It's the same with TOC. You can create XML entries, but to get them updated, you force Word to refresh them on open. Isn't what you would expect?
When I insert a page number in Microsoft Word, I don't get that dialog. So the user does not expect such a dialog.
There is a difference between the standard page number which we have available in headers/footers (probably would require some work to get it "anywhere") that is inserted as stdBlock
var pageNumber = document.Header.Default.AddPageNumber(WordPageNumberStyle.PlainNumber);
And using Fields:
document.AddField(WordFieldType.NumPages);
1st one doesn't force Word to do anything, the other one does (regardless if you have UpdateFields on or don't have nothing added) triggers word to do something. Maybe being inside StdBlocks impacts how it's parsed or maybe the way it's added. Surely there's a difference.
Oh! Thanks! I had missed the standard page number. No need to do anything then :) Thanks again!
If I add fields to a document:
then Word shows a dialog:
Is there any way to avoid this dialog? I have tried using property
UpdateFieldsOnOpen
, but there was no difference: