Scroll Title Macro - How does it know a 'Figure' from a 'Table' from Something Else?



  • Avatar

    I have the macros working. I cannot upload the Word, PDF or .txt files here to show the answer. Note the named markers delimited by ++ and ++ in each caption for Figure or Table. The cross-references use a different and distinct delimiter, ===[ and ]=== to denote where a cross-reference is to be inserted. These delimiters are all deleted by the macro after it inserts the fields.

    After running the macro. Note the captions do not have the named markers anymore; and the cross-references are pointing to the Figure and Table by number. One has to update the List of Figures and List of Tables using F9 to delete the named markers from the listed captions.

    I believe that all this text, with the named markers and the delimited cross-reference requests, can be inserted in Confluence pages, perhaps with SCROLL ONLY INLINE so that it does not show up in the displayed Confluence pages. I will try that next.

    Macro code available on request. I put it into my Normal.dotm, so that I do not need to have macro-enabled Word files for my content material. One does have to change Settings to allow macro execution when running Word.

  • Avatar

    I have added a macro to process tags for arbitrary cross-references to non-captioned items. Note that the syntax for the tags is somewhat different from those tags used in the prior macro for Captions and Cross-References. So, I think they can co-exist. One could easily extend the syntax to use the same syntax for all, but with a modifier (as I did for the "cross-reference type" in today's macro).

    Refer also to the attached compressed file, which contains an example Word file, a .txt file with the macro code, and two PDFs: one before, and one after running the macro.


    Before processing, the 'calling' items:

    Before processing, the target items (numbered list):

    After processing, showing the numbered items and the page numbers in the cross-references:


  • Avatar

    I created a Microsoft VBA Word macro to search for and process tagged captions which were exported from Confluence pages into a single, large Word file. The export macro can build a List of Tables (using the Template file). Captions can be added below each Table and Figure. I added a tag string to name each Figure in its caption. I added a tag string in the normal text wherever I want a cross-reference in the Word file.


    Figure 1 ++SYSTEM_DIAGRAM++ System Diagram


    For a diagrammed view of the system, refer to ===[SYSTEM_DIAGRAM]===.

    Each figure would have a unique name, which is translated by the macro using the hidden bookmark names of the figures. The cross-reference tag (===[xxxx]===) is replaced with "Figure 1" in the example. I will do the same for Tables, and eventually provide syntax to make cross-reference to "page nnn".

    This is admittedly awkward, but it does allow for cross-references to figures and tables outside of a particular Confluence page's content. That is, one child page can refer to a Figure in another child page, using its unique name. Maintaining these tags will be a bit of extra work, but it can lead to a more readable Word (and PDF, and printed) file, using "See Figure n" instead of an arbitrary hyperlink to who-knows-where in the large Word/PDF file.

    Stay tuned.

  • Avatar
    Nils Bier

    Hi Bill,

    Thank you very much for sharing your script with our community.
    We'll check if we can come up with a documentation for this, and will communicate it via this thread if we have any news to share.


  • Avatar
    Michael Rudolph

    Dear Bill,

    can you provide your VBA as a sample?

    Kind Regards,
    M. Rudolph

  • Avatar
    Paul Fleer

    Hi Bill,

    Your macro looks like the perfect workaround for our company's workflow with Scroll.
    I was wondering if you'd be able to share your example Word file and macro to As I can't seem to find them it in the messages above.

    Thank you in advance


  • Avatar
    Marco Garcia

    Hi Bill

    I have the same problem (almost). Could you share the word file and macro, or the VBA code, please?

    My email is

    Thanks and regards


  • Avatar
    Paul Fleer

    Hey Marco,

    I reached out to Bill outside of this forum to get hold of the macro or VBA code, and unfortunately he has left the workplace where he used it and no longer has access to it.
    Not sure if someone else still had it, or maybe is competent enough one VBA to recreate it maybe?


Please sign in to leave a comment.

Powered by Zendesk