S
Sammy
Hello,
I get a Run-time error "91" - Object variable or with block varialbe not set
message on this macro:
Sub tryit()
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryHeader
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.TypeText Text:="mytagline"
Selection.Range.InsertAutoText
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
It errors on this line:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Any clues? Thanks!
I get a Run-time error "91" - Object variable or with block varialbe not set
message on this macro:
Sub tryit()
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Selection.EndKey Unit:=wdStory
Selection.InsertBreak Type:=wdPageBreak
ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryHeader
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.TypeText Text:="mytagline"
Selection.Range.InsertAutoText
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
It errors on this line:
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Any clues? Thanks!