Hello,
I've written a program that sends an email to everyone on an Excel
spreadsheet mailing list. I want the user to be able to send themselves a "test" mail, to confirm that the contents and attachments are correct,
before sending to the whole list. Is there a way to get Outlook to find the current user's address to put in the To field? Something like:- Message.To = ME, where ME is the current user's address?
But i m not getting the appropriate results can anyone tell me how to to that?
Thanks in advance.
Code:Sub x() Dim olApp As Outlook.Application Dim olMAPI As Outlook.Namespace Set olApp = CreateObject("Outlook.application") Set olMAPI = olApp.GetNamespace("MAPI") MsgBox olMAPI.CurrentUser.Address End Sub
Thank Andy for your reply tried this and its working.Thanks very much.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks