D
Dave M.
Hi all,
I'm trying to create a macro for inserting numbered equations with
right-justified equation numbers. I just re-installed Office 2004
(updated to 11.3.6) on an Intel Mac (10.4.10). I recorded the macro
by taking the exact steps I use to set the proper style, tab to the
center tab, insert the equation, tab to the right-justified tab,
insert the number (using SEQ eq), hit 'return' and I'm done.
If I do the steps manually, all is well. WHen I try to run the macro,
I get the following error:
"The server application, source file, or item cannot be found. Make
sure the application is properly installed, and that it has not been
deleted, moved, or renamed."
The next box has the following:
"Run-time error '4198': Command failed"
Here is the macro that was recorded. The line that I've spaced out is
the line that the debugger shows as having the error.
Sub Equation()
'
'
Selection.Style = ActiveDocument.Styles("Numbered Equation")
Selection.TypeText Text:=vbTab
(Here is the line that generates the error)
Selection.InlineShapes.AddOLEObject LinkToFile:=False
Selection.TypeText Text:=vbTab & "("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _
"SEQ eq", PreserveFormatting:=True
Selection.TypeText Text:=")"
Selection.TypeParagraph
End Sub
If I re-record the macro and leave out that line, everything works.
I use a lot of numbered equations so this is a rather handy macro to
have.
Ideas?
Dave
I'm trying to create a macro for inserting numbered equations with
right-justified equation numbers. I just re-installed Office 2004
(updated to 11.3.6) on an Intel Mac (10.4.10). I recorded the macro
by taking the exact steps I use to set the proper style, tab to the
center tab, insert the equation, tab to the right-justified tab,
insert the number (using SEQ eq), hit 'return' and I'm done.
If I do the steps manually, all is well. WHen I try to run the macro,
I get the following error:
"The server application, source file, or item cannot be found. Make
sure the application is properly installed, and that it has not been
deleted, moved, or renamed."
The next box has the following:
"Run-time error '4198': Command failed"
Here is the macro that was recorded. The line that I've spaced out is
the line that the debugger shows as having the error.
Sub Equation()
'
'
Selection.Style = ActiveDocument.Styles("Numbered Equation")
Selection.TypeText Text:=vbTab
(Here is the line that generates the error)
Selection.InlineShapes.AddOLEObject LinkToFile:=False
Selection.TypeText Text:=vbTab & "("
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty,
Text:= _
"SEQ eq", PreserveFormatting:=True
Selection.TypeText Text:=")"
Selection.TypeParagraph
End Sub
If I re-record the macro and leave out that line, everything works.
I use a lot of numbered equations so this is a rather handy macro to
have.
Ideas?
Dave