M
Me
When I open a previously saved file and cancel options to enter a new number
and form name, a debugging error message comes up (Run-time error ‘4605’).
When the "end" option within that dialog box is selected, my cursor is placed
within the header instead of in the document, and when I close out of the
header/footer toolbar, I’m taken back to the document, but the entire
document is selected instead of me simply being within a certain cell or row.
This debugging error does not happen when the form is being created as
normal; this is only an issue when previously saved forms are opened to be
edited.
When the "debug" option within that dialog box is selected, I am taken into
the Visual Basic editor and show the following macro:
* * * * * *
Sub AutoOpen()
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
* * * * * *
The macro bombs out at “ActiveWindow.ActivePane.View.NextHeaderFooter.â€
I am not familiar with VB coding, so that’s why I’m asking assistance here.
Any help would be greatly appreciated.
Thanks in advance.
Me
and form name, a debugging error message comes up (Run-time error ‘4605’).
When the "end" option within that dialog box is selected, my cursor is placed
within the header instead of in the document, and when I close out of the
header/footer toolbar, I’m taken back to the document, but the entire
document is selected instead of me simply being within a certain cell or row.
This debugging error does not happen when the form is being created as
normal; this is only an issue when previously saved forms are opened to be
edited.
When the "debug" option within that dialog box is selected, I am taken into
the Visual Basic editor and show the following macro:
* * * * * *
Sub AutoOpen()
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
* * * * * *
The macro bombs out at “ActiveWindow.ActivePane.View.NextHeaderFooter.â€
I am not familiar with VB coding, so that’s why I’m asking assistance here.
Any help would be greatly appreciated.
Thanks in advance.
Me