K
kurt
I'm writing a macro that uses the following code, but at this point I get an
error, and my macro does not allow going into the header.
It works perfectly on a PC at my home, but not on the PC at my office.
The error I get is: Object variable or WithBlock variable not set (Run time
error 91)
Any ideas?
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.PasteAndFormat (wdPasteDefault)
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
THANKS!
kurt
error, and my macro does not allow going into the header.
It works perfectly on a PC at my home, but not on the PC at my office.
The error I get is: Object variable or WithBlock variable not set (Run time
error 91)
Any ideas?
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.PasteAndFormat (wdPasteDefault)
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
THANKS!
kurt