Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Trouble with Word and Normal.dot
Message
 
To
08/07/2003 16:07:51
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00808172
Message ID:
00808716
Views:
14
When you create the document use a specified Word template file instead of the normal.dot.

For example:

oWordObj = CREATEOBJECT("Word.Application")
oDoc = oWordObj.Documents.ADD(lcTemplate) && lcTemplate represents the Word template file

HTH,

Paul.


>For those interested, I found an obscure related problem, which is probably the cause of my problem. At the very least, it has provided me with a strategy around the issue.
>
>MSDN KB article 322192 talks about a problem when importing PowerPoint slides in Word 2002. The normal.dot gets corrupted, and the cause (according to MS anyways) is Norton Antivirus. Since I'm importing HTML into Word, I thought the problem may be related.
>
>Turns out that disabling Norton Antivirus does not resolve the problem (though I still need to test with shutting down my machine), as the article would suggest, but renaming the global template does.
>
>I can't ask my cusomters to shut off Norton, so now my strategy is going to be:
>1) Determine if Norton AV is running on the given machine (which I can do using Windows API functions). If it's not running, no problem. If it is, continue.
>2) Where is Normal.Dot stored on given machine (not sure about this one)
>3) Can I get exclusive access to it to temporarily rename it (use Try/Catch/Finally)
>4) Run my automation process
>5) Delete the newly created Normal.dot
>6) Rename the previous normal.dot back to normal.dot
>
>Any thoughts about this?
>
>Thanks,
>
>David
>
>
>>Hi All,
>>
>>I'm running into an issue which is affecting my ability to automate Word. It's only affecting a few of my customers - it seems only those running Word XP on Windows XP.
>>
>>Here are the symptons:
>>1) When trying to automate, I get the following error message when adding a document to a Word instance: "The document 'Normal.dot' caused a serious error the last time it was opened. You may continue opening it or perform data recovery by clicking 'Recover Data'...."
>>2) When I open Word on an affected machine through the Start Menu, I get the following message: "Normal.dot was being edited by another Word session."
>>3) When I close out of Word after starting it up an affected machine, I get the following: "Changes have been made that affect the global template, Normal.dot. Do you want to save these changes?"
>>4) In the Microsoft Templates folder, which stores Normal.dot, after closing out of Word, it leaves a file named "~normal.dat", even if I delete it before opening Word.
>>
>>I checked the task manager, and there are no hidden instances of Word running.
>>
>>Any thoughts would be appreciated.
>>
>>Thanks,
>>
>>David
Previous
Reply
Map
View

Click here to load this message in the networking platform