Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
Network:
Windows 2003 Server
Well, this is a step in the right direction. This still crashed but not because _MailItem doesn't exist. This time I was informed that:
"_MAILITEM_put_SaveSentMessageFolder' does not exist."
Hmmmm - I think that this is happening because the interface being implemented is from the wrong version of Outlook and that version of Outlook does not have a _MAILITEM_put_SaveSentMessageFolder method. I have run into a similar problem trying to implement interfaces in Excel - Microsoft changed the interface between XP and 2003.
I'm guessing that the interface that I selected from the Object Browser does not completely match the interface of whatever class is represented by the GUID you gave me.
The guid is for the Outlook Object Library.
IOW, if I use "Outlook.Application" in my code, my code will continue to work even if a user upgrades to a newer version of Outlook.
In my experience automating Word, using "Word.Application" worked as long as I only had one version of Word installed on the machine. As soon as I upgraded, it stopped working and crashed, just like your code was doing when you specified "Outlook.Application". The only way I could get it to work was either by specifying the guid and version number or using a fully qualified path name to the Word object library.
If I hardcode a GUID, what happens if they upgrade?
If the interface changes vbetween the versions, you have to modify your code.
Thanks for your help. BTW, what class is the GUID for? An older version of an Outlook Application?
It is for the Outlook 2003 Object library - just register it in the intellisense manager and look at the data field in FoxCode.dbf - it will give you the guid and version number.
Précédent
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