I'm trying to figure out how to copy a range out of Doc1 into Doc2 while preserving Styles
This works:
But I'd prefer to not have to resort to Copy and Paste
So I'm looking for the magic Range property that does this.
But I'm not having any luck. One would think, from reading
That
Range2 = Range1.Duplicate
should do the trick. But no.
Any suggestions?
This works:
Code:
'Get M9Content from G9R
With G9RDoc 'A Document Object
BeginRange = .Bookmarks("Mark2").End
EndRange = .Bookmarks("Mark3").Start
Set G9R_M9Content = .Range(BeginRange, EndRange)
End With
'copy the G9R_M9Content to M9_M9Content
Set M9_M9Content = M9Doc.Bookmarks("M9Content").Range
G9R_M9Content.Copy
M9_M9Content.Paste
But I'd prefer to not have to resort to Copy and Paste
So I'm looking for the magic Range property that does this.
Code:
Range2.Everything = Range1.Everything
But I'm not having any luck. One would think, from reading
VBA Help said:Range.Duplicate Property
Returns a read-only Range object that represents all the properties of the specified range.
Syntax
expression.Duplicate
expression Required. A variable that represents a Range object.
That
Range2 = Range1.Duplicate
should do the trick. But no.
Any suggestions?