I have been working on some Word Templates recently and noticed an issue with the Page Numbers coming through as !Syntax Error, !
I have seen this before, and previously I have just replaced the page numbers by inserting new page numbers in Word. This time, I decided to have a look and see if I could fix the problem without having to do that. If I right clicked on the Page Number and chose ‘Toggle Field Codes’ a new error showed up telling me that the Bookmark was not defined.
The next step was for me to compare a layout that did work, and opening the Bookmarks on the document in Insert > Bookmark, I found that there were 5 bookmarks on the working document:
The missing bookmark on the broken Template was StartTemplateDocumentHeaderBookmark.
I recreated this bookmark in the same place as the document that works, saved the Template and then uploaded it into Dynamics GP again. The Page number now worked when printing the invoice!
Until next time 🙂