emailadress from composer is empty

Add-in Express™ Support Service
That's what is more important than anything else

emailadress from composer is empty
 
karim




Posts: 22
Joined: 2005-11-30
hi,


I want save a mail before i send

i save mail with objMailItem.SaveAs(file, olMSG);

but emailadress from composer is empty how can i get the name or emailadress from composer for save it in my msg file.

how to make ?
Thank.



Posted 16 Jan, 2006 09:39:02 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Karim,

Try to call the Save method before the SaveAs one.

Posted 16 Jan, 2006 09:45:19 Top
karim




Posts: 22
Joined: 2005-11-30
Hi,

is similar

I try
....
objMailItem.Save;
showmessage(objMailItem.senderName);
//SenderName is empty Because the message was not sent
objMailItem.SaveAs(Strfile, olMSG);
.....

i make this code On OutlookApp.OnItemSend event
Posted 16 Jan, 2006 10:22:01 Top
Vlad


Guest


That's how Outlook works. The sender name is not assigned until you send the email. You can't change this easily as it comes from the account details that are setup in your Outlook system. Microsoft did this to avert Virus Writers from sending emails that look like they are coming from others that isn't you.

Vlad
Posted 16 Jan, 2006 11:27:58 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Karim,

Sorry, I thought you were speaking about the Recipients property. As for the SenderName property, Vlad is right, this property is empty until the e-mail message is sent.

Posted 16 Jan, 2006 11:40:09 Top
karim




Posts: 22
Joined: 2005-11-30
Hi,

Thanks

But why then i can get this information with

OutlookApp.GetNamespace('MAPI').CurrentUser.Address ?
Posted 17 Jan, 2006 10:28:33 Top
Dmitry Kostochko


Add-in Express team


Posts: 2875
Joined: 2004-04-05
Hi Karim,

With this code you can get only an e-mail address of a default Outlook e-mail account. If the user has several email accounts, the code will give incorrect results.


Posted 17 Jan, 2006 10:40:09 Top
karim




Posts: 22
Joined: 2005-11-30
Thanks Dmitry.
Posted 17 Jan, 2006 11:15:31 Top