I am creating a Word document using Novacode DocX in which I want to insert a piece of text, and then later on in the document insert a reference to it in the form of '(see page X)' where X is dynamically generated by Word.
In Word itself, I can easily do this by creating a bookmark for the first piece of text and inserting a cross-reference where I want the page number.
I think I know how to add a bookmark using DocX, but how do I create the cross-reference? Is this even possible in DocX?
Many thanks in advance for your help, Chris
After some fiddling, I finally found a way to achieve this:
destination
is the name of the bookmark you want to cross-reference.Any suggested improvements would be most welcome.