none
Question on Selection.InsertCrossReference method in VBA (Word) RRS feed

  • Question

  • Hi, 

    We are trying to insert cross reference (xref) programmatically using VBA method. 

    (The systems are mostly Word 2010 on Win 7 32bit.)

    If we use Selection.InsertCrossReference method, xref is created in the following format:

    REF _Ref######### \h \* Charformat

    How is the 9-digit number (marked as # above) generated? 

    Maybe some calculation using system time?

    Since we need to merge many documents into one, we want to make sure that the value is not duplicated even if the xrefs are created by other users.

    If it can be duplicated, we will have to come up with a measure to prevent them from being duplicated.

    Therefore, understanding the logic will be helpful for this as well.

    Thank you.

    Thursday, June 25, 2015 8:46 AM

Answers

All replies