M
Me
I recently inherited a Word file at work and I'm getting this error on an
auto run macro. Since I don't know anything about VB programming, I was
wondering if somewone could tell me how to fix this problem. This error
prevents me from using this file.
The code is:
* * * *
Sub AutoNew()
Selection.HomeKey Unit:=wdStory
Selection.WholeStory
Selection.Fields.Update
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Or
ActiveWindow.ActivePane.View.Type _
= wdMasterView Then
ActiveWindow.ActivePane.View.Type = wdPageView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
ActiveWindow.ActivePane.View.NextHeaderFooter
Selection.WholeStory
Selection.Fields.Update
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Selection.HomeKey Unit:=wdStory
End Sub
* * * *
Can anybody help me with this?
Thanks.
auto run macro. Since I don't know anything about VB programming, I was
wondering if somewone could tell me how to fix this problem. This error
prevents me from using this file.
The code is:
* * * *
Sub AutoNew()
Selection.HomeKey Unit:=wdStory
Selection.WholeStory
Selection.Fields.Update
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Or
ActiveWindow.ActivePane.View.Type _
= wdMasterView Then
ActiveWindow.ActivePane.View.Type = wdPageView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
ActiveWindow.ActivePane.View.NextHeaderFooter
Selection.WholeStory
Selection.Fields.Update
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Selection.HomeKey Unit:=wdStory
End Sub
* * * *
Can anybody help me with this?
Thanks.