PC Review
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Re: Sett mailbox to send from
Forums
Newsgroups
Microsoft Outlook
Microsoft Outlook VBA Programming
Re: Sett mailbox to send from
![]() |
Re: Sett mailbox to send from |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
Hi,
Look at the Logon method of the Namespace object. Of course the profile would have to exist on the machine that the code is running on. HTH Dan Artuso, Access MVP "Lobo" <lobo@smokin.net> wrote in message news:08ff01c33bc0$b8b560c0$a601280a@phx.gbl... > I'm developing an Access aplication that sends out mail > with attachments to 100's of different email addresses. > I am able to send the mail no problems, but I need to be > able to specify what mailbox the mail item should be sent > FROM. I am using the code as show below, is there any > property I can change before the send event to get it to > go out from the non default mailbox > > Cheers > > > Dim objOutlook As New Outlook.Application > Dim objMessage As MailItem > Dim objNameSpace As Outlook.NameSpace > > Set objMessage = objOutlook.CreateItem(olMailItem) > > With objMessage > .To = strTo > .Subject = strSubject > .Body = strMessageBody > .Attachments.Add ("C:\notification.doc") > .Send > End With |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

