Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Word GetObject() - WHACKED?????
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00538237
Message ID:
00538259
Vues:
9
>>Does the GetObject work if you follow it with the parameter telling what to bring up?
>>
>>oMyWord = GETOBJECT("C:\VFPTraining\letter.doc","Word.Application")
>>
>>Could be .doc is not know what to bring up. Just a guess.
>
>Thanks for the quick reply...
>
>Let me expand a bit on where I want to go with this because having to add the class name defeats the purpose. I want to be able to let the user select a file and then just do a GETOBJECT() to open the appropriate program, Word, Excel, etc. So I don't want to have to name the class to use in GETOBJECT(). Yes, I know I could grab the .doc or .xls extension from the file and create the appropriate type of object with CREATEOBJECT(), but I'd rather be able to use GETOBJECT() and have it figure it out.

Then your getting into a segment which I coded for as I did not trust the GetObJect for this. In my apps I query the system for the extension then bring up the application via shell exec. Using CreateObject when I know what I am dealing with. Sorry I could not help further, but I understand what you are trying to do. Good luck.
Bret Hobbs

"We'd have been called juvenile delinquents only our neighborhood couldn't afford a sociologist." Bob Hope
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform