Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Word Basic
Message
From
03/07/1999 09:39:06
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
03/07/1999 09:08:41
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Title:
Miscellaneous
Thread ID:
00237163
Message ID:
00237170
Views:
10
>I am using a Word Basic object to do some file formatting and am having trouble closing the file being formatted. Syntax is as follows:
>
>oWordDoc = CREATEOBJECT('word.basic')
>
>WITH oWordDoc
> .FileOpen(myfile)
> .FileSaveAs(txtfile, 2)
> .FileQuit
> RELEASE oWordDoc
>ENDWITH
>
>Myfile is a word document and txtfile is the text file. I strip the .doc extension and add the .txt extension to myfile and save the result in the variable txtfile before doing the word basic code. I am attempting to open and use the file represented by txtfile (with another name and referencing by file handle (FOPEN) ) in another area of code, but I get a "File is in use" error. If I ignore the error, all is well. My thoughts are that .FileQuit is not closing the file. I have tried .FileClose, .FileCloseAll with no luck. Any suggestions? Your help will be greatly appreciated.
>
>Paul
FileExit[2]
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform