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
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top