Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Automation
Message
 
 
To
26/11/2000 10:17:34
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
00445480
Message ID:
00445624
Views:
36
John,

I just tried this code, and I'm not seeing the same thing you're seeing. I don't get an OLE error on the second proc. It may be related to the "do some stuff" code. What, specifically, is the OLE error message?

- della

>I have noticed that when I use the Word spell checker I need to shut it down differently than when I create a document in Word. To make sure I get rid of the winword in the task manager I do the following.
>* Spell checking
>oWord = CreateObject("Word.Application")
>IF oWord.CheckSpelling(oedtQuote.Value) = .F.
>  WITH oWord
>    .Documents.add
>    .Selection.TypeText(oedtNotes.Value)
>    .Visible = .T.
>    .WindowState = 0
>    .Options.CheckGrammarWithSpelling = nchkGrammar
>    .Options.IgnoreUpperCase = nchkIgnoreCase
>    .Options.IgnoreMixedDigits = nchkIgnoreNumber
>    .Options.IgnoreInternetAndFileAddresses = nchkIgnoreInternet
>    .CustomDictionaries.ActiveCustomDictionary = ;
>      .CustomDictionaries(ThisForm.PageFrame1.Page5.lstDictionaries.ListItemID)
>    IF nchkGrammar
>      .Activedocument.CheckGrammar
>    ELSE
>      .Activedocument.CheckSpelling
>    ENDIF
>    .Selection.WholeStory
>    oedtNotes.Value = .Selection.Text
>    .ActiveDocument.Close(0)
>    .Visible = .F.
>  ENDWITH
>ENDIF
>oWord.Quit()
>oWord = .NULL.
>RELEASE oWord
>* create a document on a word template
>oWord = CreateObject("Word.Application")
>oDoc = .Documents.Open(lcTemplate)
>... Do some stuff
>oWord.Visible = .T.
>oWord.WindowState = 0
>oDoc = .NULL.
>RELEASE oDoc
>oWord = .NULL.
>RELEASE oWord
>
>If I do a oWord.Quit() in the second example I get an ole error. No biggie just thought I'd pass this along...
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform