Excel VBA to cycle through Word bookmarks and insert ranges (text, graphs & tables)

  • Re: Excel VBA to cycle through Word bookmarks and insert ranges (text, graphs & table


    All the charts are not linked on my end. They are all set to update manually rather than automatically. The only time they would update is if you selected all the text in the document and hit alt+F8.


    But even so, you could just change the copy and paste method that I have employed to one of the following:


    Code
    'Paste as GIF
    Selection.PasteSpecial Link:=False, DataType:=13, Placement:=wdInLine, DisplayAsIcon:=False
    
    
    'Paste as JPEG
    Selection.PasteSpecial Link:=False, DataType:=15, Placement:=wdInLine, DisplayAsIcon:=False
    
    
    'Paste as PNG
    Selection.PasteSpecial Link:=False, DataType:=14, Placement:=wdInLine, DisplayAsIcon:=False


    I haven't tested this myself, but I don't see any reason as to why this shouldn't work with the program that I provided here.

  • Re: Excel VBA to cycle through Word bookmarks and insert ranges (text, graphs & table


    hi,


    Great work on this code. If I was trying to prepare a new word doc to apply this code is there anything i need to know about setting the bookmarks apart from naming then "ARTablexxx", "ARTextxxx" or "ARChartxxx"??? Like wise for naming the ranges in excel? Any help with this would be very beneficial.


    thanks,

  • Re: Excel VBA to cycle through Word bookmarks and insert ranges (text, graphs & table


    Hi thank you for sharing this code it works well... Questions however are:-


    1. Would it be possible to amend this code to allow the word file to which the excel data is being pushed to be located in a separate folder???


    2. Is there any way to first run a check in word to find the bookmarks in word that correspond to the name ranges in excel as I have noticed the function stalls and reports and error when a bookmark exists in the requested word document but a name range of the same name does not exist in excel..?


    and


    3. Please excuse my ignorance if these request are simple, I am VGA novice at best...

  • Re: Excel VBA to cycle through Word bookmarks and insert ranges (text, graphs & table


    Please do not post questions in threads started by other members.


    Start your own thread, give it a clear and concise title that describes your issue and explain your problem fully. If you think this thread can help illustrate your issue you can add a link by copying the URL from the address bar of your browser and pasting into your message.

Participate now!

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