Information générale
Catégorie:
COM/DCOM et OLE Automation
>It seems like OLE Automation might be useful but I have no way of knowing what the appropriate load commands are for the various applications associated with the documents. If I could only emulate what Explorer is doing.
>
Use the GetObject() function to launch the application, passing only the first parameter (the document). That'll launch or connect to the appropriate application, if it's an Automation server and return a reference to the document object within the server:
oDocument = GetObject( cFileName )
There are issues you'll have to deal with, of course. The biggest is that some of the associated applications may not be servers. You mentioned Notepad, for example - I'm pretty sure it's not an Automation server.
Tamar
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement