Hi Helmut,
I have tried a very simple routine from Access
Public Sub pp()
Dim objWordApp As Object
Dim objWordDoc As Object
Set objWordApp = GetObject(, "Word.Application")
For Each objWordDoc In objWordApp.Documents
MsgBox objWordDoc.BuiltInDocumentProperties(6) & " " & _
objWordDoc.Name
Next
End Sub
And also this one crashes Word.
But I noticed that the crash happens only on a my particular document.
I've Tried to open this Document alone in Word and click on
File|Properties and strange enough also just in Word without any VBA
when I click OK sometime (not always) Word crashes.
It's just a Word Document, not an atomic bomb.
Greeting from Rome, Lauro
>Hi Lauro,
>
[quoted text clipped - 9 lines]
>Win XP, Office 2003
>"red.sys" & Chr$(64) & "t-online.de"
Lauro - 09 Aug 2005 17:14 GMT
Hi, Helmut
the mistery continues...
I tried to open the Culprit Document with Word on another computer. It
still crashes Word when I do File|Properties and then OK.
I tried with a similar Document (based on the same Template) and is
OK. Both documents are based on a Template not present in the
computer.
The crash happens only if the Culprit Document is the only one opened
in Word.
Do you think that that in someway that document got corrupted and I
don't have to warry with the others?
Thanks, Lauro
>Hi Helmut,
>
[quoted text clipped - 36 lines]
>>Win XP, Office 2003
>>"red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 09 Aug 2005 20:36 GMT
Hi Lauro,
very likely.
I think, I've read about a very basic way to test for corruption.
Delete all of the doc and try
msgbox Len(ActiveDocument.Range)
If greater than 1 then corrupted, probably.
Gruß
Helmut Weber, MVP WordVBA
"red.sys" & chr$(64) & "t-online.de"
Win XP, Office 2003
Lauro - 10 Aug 2005 16:05 GMT
Thanks for the help
Lauro
>Hi Lauro,
>
[quoted text clipped - 13 lines]
>"red.sys" & chr$(64) & "t-online.de"
>Win XP, Office 2003