Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Permission error when saving a file - WORD
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00756484
Message ID:
00757327
Views:
14
Not sure how to get around this particular permission problem. Here is something of a work-around of the top of my head.

1. open current document
2. select whole document
3. copy selection
4. Add new document
5. Paste whole selection into new document
6. SaveAs active document.

Code goes something like this: NOTE: Not tested so there may be errors!!!!

With oWord
.Open(D:\xfilename.doc,.f.,.t.)
.Selection.WholeStory
.Selection.Copy
oDocument.Add()
.Selection.Paste
.ActiveDocument.SaveAs(c:\Newfilename.rtf,100)
etc....
endwith

HTH

Paul.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform