Hi everyone,
I want to select bookmarked text from my source document and place it into bookmarks in my target document.
So far I have considered (code below):
1. Using a 'Go To' to find the source bookmark
2. Selecting and Copying
3. Opening Target Document
4. Using a 'Go To' tot find the target bookmark
5. Pasting
However this is not ideal as I need to do this with over 30+ bookmarks and i'm not convinced is anywhere near the most efficient/correct way to do this.
Any ideas?
Private Sub GT()
Dim oSource As Document
Dim r As Range
Dim oTarget As Document
Set oSource = ActiveDocument
Selection.GoTo What:=wdGoToBookmark, name:="wholename"
Selection.Copy
'Set oTarget = Documents.Add("C:\Path\Templatename.dotx")
Set oTarget = Documents.Open("C:\Users\herriale\Desktop\New folder\Phase 2\Template (MY.G.PBR) 31.3.15.dotm")
Selection.GoTo What:=wdGoToBookmark, name:="PlayerName"
Selection.PasteAndFormat (wdFormatPlainText)
End Sub