Word Macro not finding bookmarks IF they are inside textboxes

  • Hi there! Thank you for taking the time to read my question.


    I am working on a report generator in VBA that runs from a macro-enabled word document, and queries a macro-enabled excel workbook.


    I have managed to get values within specific cells to update bookmarks within the word document.


    However, I get errors that certain bookmarks cannot be found, but only the ones that are within text boxes.


    Here is my code:


    This is the error I am getting:

    Code
    Bookmark 'Client1' not found in document
    '5555R001.XX.YYMMDD.docm'
    Content not updated


    The error repeats for 'Address1' but all the other ones update as expected.


    Thank you and have a good day!

  • Hi Roy


    The text boxes are part of my standard report which needs to be consistent. Thank you for the suggestion, but I am in need of a technical solution.


    Cheers

  • Hello,


    When dealing with VBA for Word ... you can jump to[SIZE=12px] Graham Mayor's excellent site :[/SIZE]


    http://www.gmayor.com/word_vba_examples.htm



    Hope this will help

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

  • I was working on a report in MS word that runs from a macro enabled and there in faced this issue and also it was showing error on that page. As I am using Microsoft Office 2013 it was showing error code 0x4004f00c on that page. I found the way out from it and it really worked.

  • Glad you could fix your problem ...:smile:

    If you feel like saying "Thank You" for the help received, do not hesitate to click the "Smiley" icon, below, in the bottom right corner :)

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!