![]() |
#4
|
||||
|
||||
![]()
It is just a matter of swapping the documents and their ranges around so that you copy one range to the other e.g.
Code:
Dim oDoc As Document Dim oTarget As Document Dim oBM As Range Dim oRng As Range Set oTarget = ThisDocument Set oBM = oTarget.Bookmarks("bookmark").Range Set oDoc = Documents.Open("C:\Users\jovany\Desktop\NEW WOSPC 9.2.1_RMIR - Rollout.doc") Set oRng = oDoc.Range oBM.FormattedText = oRng.FormattedText oBM.Bookmarks.Add "bookmark" oTarget.Activate oDoc.Close 0 Set oDoc = Nothing Set oTarget = Nothing Set oRng = Nothing Set oBM = Nothing
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
Tags |
vba macro |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
megatronixs | Word VBA | 9 | 09-05-2020 02:29 PM |
Transfer data from list with multiple headings from word to excel | psohms | Word | 1 | 06-11-2015 04:39 PM |
![]() |
Bedsy | Word VBA | 4 | 03-15-2015 10:58 PM |
Transfer Data between Excel and Word | s_samira_21 | Excel | 0 | 01-19-2015 05:21 AM |
Data transfer from Word tables to Excel | shoro | Word | 4 | 10-01-2013 05:08 AM |