E
ebaralt
Hi. I have the following very simple code in a Word2000 macro. It
runs perfectly on almost all machines, but on one particular machine it
comes up the a run-time error 5825: Object has been deleted. After the
macro errors out, the ToC code is there. Has anyone got an idea what
might be happening on this one machine?
With Word.ActiveDocument
If .TablesOfContents.Count > 0 Then
.TablesOfContents.Item(1).Update '* get the error
End If
End With
(or I tried it more explicity
Dim toc As TableOfContents
With Word.ActiveDocument
If .TablesOfContents.Count > 0 Then
Set toc = .TablesOfContents(1)
toc.Update '* get the error
End If
End With
Thanks.
Elena
runs perfectly on almost all machines, but on one particular machine it
comes up the a run-time error 5825: Object has been deleted. After the
macro errors out, the ToC code is there. Has anyone got an idea what
might be happening on this one machine?
With Word.ActiveDocument
If .TablesOfContents.Count > 0 Then
.TablesOfContents.Item(1).Update '* get the error
End If
End With
(or I tried it more explicity
Dim toc As TableOfContents
With Word.ActiveDocument
If .TablesOfContents.Count > 0 Then
Set toc = .TablesOfContents(1)
toc.Update '* get the error
End If
End With
Thanks.
Elena