rocket5556
IS-IT--Management
Hi,
I am trying to find a way to use VBA to copy some information (including text, tables, bookmarks, etc.) out of a Word document and then use it several times in the same document without relying on it remaining in the clipboard the whole time.
Currently what I am doing is cutting the range out of the document, pasting in back in, changing all the bookmark names, and then pasting the range in again (this preserves the original bookmark names for later copying and pasting). As you might imagine, this is not a very quick process when it has to be done over and over again and there are quite a few bookmarks.
Is there some type of a variable that I could use to store this information and then insert it when I need it? I have tried a Range variable, but if I use a range variable for the original and then delete the original, the range variable essentially holds nothing. I need a way to keep all that information in storage.
An additional note. I found that I could paste the contents into an access object frame and this could be later used to retrieve the information, but this isn't a very elegant solution, and I don't want to have to rely on this. Isn't there a comparable data type that could store this stuff?
Thoughts?
Thanks!
I am trying to find a way to use VBA to copy some information (including text, tables, bookmarks, etc.) out of a Word document and then use it several times in the same document without relying on it remaining in the clipboard the whole time.
Currently what I am doing is cutting the range out of the document, pasting in back in, changing all the bookmark names, and then pasting the range in again (this preserves the original bookmark names for later copying and pasting). As you might imagine, this is not a very quick process when it has to be done over and over again and there are quite a few bookmarks.
Is there some type of a variable that I could use to store this information and then insert it when I need it? I have tried a Range variable, but if I use a range variable for the original and then delete the original, the range variable essentially holds nothing. I need a way to keep all that information in storage.
An additional note. I found that I could paste the contents into an access object frame and this could be later used to retrieve the information, but this isn't a very elegant solution, and I don't want to have to rely on this. Isn't there a comparable data type that could store this stuff?
Thoughts?
Thanks!