Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by rocket5556

  1. rocket5556

    Word VBA: Copy range to variable for later use?

    Thanks for all comments. Fumei- The point of the code I posted was just to show that when the data inside the bookmark is deleted the duplicate range also ends up containing no data. The example didn't really have anything to do with deleting the bookmark or not. I know you can't technically...
  2. rocket5556

    Word VBA: Copy range to variable for later use?

    Ok, well I didn't mean to post that yet, but the code above works if I comment out the two lines below "'Delete the information in the original range". If those lines run I get an error message on the "myRange.copy" line: "This method or property is not available because no text is selected."...
  3. rocket5556

    Word VBA: Copy range to variable for later use?

    I had thought of the duplicate thing, but that doesn't seem to work. Here is some sample code: Function test() 'Variable declaration Dim m_objWord As word.Application Dim m_objDoc As word.Document Dim m_objDoc2 As word.Document Dim myRange As Range 'Setup 2...
  4. rocket5556

    Word VBA: Copy range to variable for later use?

    Hey, Thanks for the idea. I had thought of that as well and may try it out. I just thought it seemed silly to have a create a whole document just to store some temporary stuff. I was hoping their would be another way to do it, but maybe there isn't...
  5. rocket5556

    Word VBA: Copy range to variable for later use?

    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...

Part and Inventory Search

Back
Top