Could someone please tell me how I can paste text using ".PasteAndFormat (wdFormatSurroundingFormattingWithEmphasis)" from a variable called copyBody into the range of two bookmarks in Word. I have written code on how I would like it to work -
copyBody = ActiveDocument.Range(ActiveDocument.Bookmarks("Bookmark 1").Range.Start, _
ActiveDocument.Bookmarks("Bookmark 2").Range.End)
With ActiveDocument
Set rng = ActiveDocument.Range(ActiveDocument.Bookmarks("Text").Range.Start, _
ActiveDocument.Bookmarks("EndText").Range.End)
'This is not correct but along the lines of what I need
rng.text = copyBody.PasteAndFormat (wdFormatSurroundingFormattingWithEmphasis)
End With
Any help would be much appreciated!
Louis
copyBody = ActiveDocument.Range(ActiveDocument.Bookmarks("Bookmark 1").Range.Start, _
ActiveDocument.Bookmarks("Bookmark 2").Range.End)
With ActiveDocument
Set rng = ActiveDocument.Range(ActiveDocument.Bookmarks("Text").Range.Start, _
ActiveDocument.Bookmarks("EndText").Range.End)
'This is not correct but along the lines of what I need
rng.text = copyBody.PasteAndFormat (wdFormatSurroundingFormattingWithEmphasis)
End With
Any help would be much appreciated!
Louis