PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Re: Sett mailbox to send from

Reply

Re: Sett mailbox to send from

 
Thread Tools Rate Thread
Old 29-06-2003, 12:38 PM   #1
Daniel Artuso
Guest
 
Posts: n/a
Default Re: Sett mailbox to send from


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



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off