View Single Post
 
Old 04-17-2018, 04:27 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,106
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

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
Reply With Quote