Quote:
Originally Posted by RobiNew
Well, that was just a friendly comment! Perhaps you can explain why the code here below doesn't work at all. I want to go to the first page of the document without using Selection. Thanks!
Code:
Dim myRange As Range
Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseStart
|
RobiNew
Your code does work for what you are telling it to do. After running that code, the range is at the start of the document. Consider:
Code:
Sub ScrahtchMacro()
'A basic Word Macro coded by Gregory K. Maxey
Dim myRange As Range
Set myRange = ActiveDocument.Content
myRange.Collapse Direction:=wdCollapseStart
myRange.InsertBefore "I'm here."
lbl_Exit:
Exit Sub
End Sub
If you want to start typing at the start of the document then you have to move the insert point to the start of the document as others have explained.