Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
'Storing' Files in DBF files
Message
 
 
To
27/09/2011 23:35:32
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01524682
Message ID:
01525006
Views:
28
>>>>>The user has a button on the cutomer maintenance screen that says 'Store info in a WORD file'. I then construct a file name based on the customer number and do your shell execute function. The first time the function will bomb, since the file does not exist. I want to create the file ahead of time if it does not exist. How do I do that?
>>>>
>>>>I think if the file does not exists, you may want to activate the corresponding application for the user to create that file. Say, for the Excel or Word you can do it using OLE Automation. For other types you may simply start the application - search for RunExe samples.
>>>
>>>Bummer.
>>>
>>>This means that he will have to save the file using the complicated naming convention I use in the program. Not very elegant.
>>
>>Well, for Excel and Word is not too hard to create a new file using OLE Automation. What other types do you support?
>
>See my previous reply.
>
>It worked with automation!
>
>Now that we've come to this, am I correct that if the only files I'm dealing with are word and excel, I do not need shell execute and I can just use automation for all featrures, like opening and closing the file, etc.

Yes, you don't need ShellExecute as you can do this with automation for Word and Excel. For some other types, such as PDF or txt (notepad) it may be still helpful.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform