Z
zSplash
I'm just not "getting" this conversion from Selection object thinking to
Range object thinking!
My code was:
Sub oldCode() 'removes Doc3 from packet
DoEvents
ActiveDocument.Bookmarks("Doc3").Select
ActiveDocument.Bookmarks("\Page").Select
Selection.Cut
End Sub
Now, I've added another bookmark when trying to convert the code to a Range
object, but I get an error (4128 - Type Mismatch) with:
Sub newCode() 'removes Doc3 from packet
Dim myRange As Range, myRange2 As Range
Set myRange = ActiveDocument.Bookmarks("begDoc3").Range
Set myRange2 = ActiveDocument.Bookmarks("endDoc3").Range
ActiveDocument.Range(myRange, myRange2).Delete
End Sub
What should I be declaring (instead of a Range), or what am I missing?
TIA
Range object thinking!
My code was:
Sub oldCode() 'removes Doc3 from packet
DoEvents
ActiveDocument.Bookmarks("Doc3").Select
ActiveDocument.Bookmarks("\Page").Select
Selection.Cut
End Sub
Now, I've added another bookmark when trying to convert the code to a Range
object, but I get an error (4128 - Type Mismatch) with:
Sub newCode() 'removes Doc3 from packet
Dim myRange As Range, myRange2 As Range
Set myRange = ActiveDocument.Bookmarks("begDoc3").Range
Set myRange2 = ActiveDocument.Bookmarks("endDoc3").Range
ActiveDocument.Range(myRange, myRange2).Delete
End Sub
What should I be declaring (instead of a Range), or what am I missing?
TIA