Macro Needs to Skip Over Line If Error

K

Karin

Hi, I need the correct language and placement to jump over a line in my
macro on error. I want to jump over the last line (Application.TaskPane) on
error. Thanks! Following is my macro:

Sub AutoOpen()
'
' AutoOpen Macro
' Macro recorded 02/07/2007 by Karin Richardson
'
With ActiveWindow.view
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
.ShowHiddenText = True
End With
Options.UpdateFieldsAtPrint = True
Application.TaskPanes(wdTaskPaneFormatting).Visible = True

End Sub
 
J

Jean-Guy Marcil

Karin was telling us:
Karin nous racontait que :
Hi, I need the correct language and placement to jump over a line in
my macro on error. I want to jump over the last line
(Application.TaskPane) on error. Thanks! Following is my macro:

Sub AutoOpen()
'
' AutoOpen Macro
' Macro recorded 02/07/2007 by Karin Richardson
'
With ActiveWindow.view
.ShowRevisionsAndComments = False
.RevisionsView = wdRevisionsViewFinal
.ShowHiddenText = True
End With
Options.UpdateFieldsAtPrint = True
Application.TaskPanes(wdTaskPaneFormatting).Visible = True

End Sub

Use
On Error Resume Next
But, it is generally better to try to understand why an error occurs and
code accordingly...

--

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
[email protected]
Word MVP site: http://www.word.mvps.org
 
Top