|
-
Dec 7th, 2000, 09:26 AM
#1
Thread Starter
Lively Member
Hi all, been spending the last few hours getting to grips with MAPI, seems to be getting along fine (thanks to Buzby for the help ) Just a quich query, anyone know if there is a way to specify a senders address using MAPI or will it just use the default account in the mail client eg Outlook?
Any suggestions are appreciated
Cheers
Paul
The problem with designing something completely foolproof is to underestimate the ingenuity of a complete fool. - Douglas Adams
I know the human being and fish can coexist peacefully. - GWB
I think we agree, the past is over. - GWB
-
Dec 7th, 2000, 01:01 PM
#2
Fanatic Member
...
Dim oSession as MAPI.Session
Dim NewMsg as MAPI.Message
Dim Receiver as MAPI.Recipient
Dim AddEntries as MAPI.AddressEntries
'Ok...
Dim OnBehalfOfSender as MAPI.AddressEntry
Set oSession = CreateObject("MAPI.Session")
oSession.Logon
'There Create your new message
Set NewMsg = oSession.Outbox.Mesages.Add
......
'Here we go... Need to reset the current user of the MAPI
'session object
Set AddEntries = oSession.AddressLists(1).AddressEntries
AddEntries.Filter = Nothing 'Reset
AddEntries.Filter = "<User in question>"
Set OnBehalfOfSender = AddEntries.GetFirst
Set NewMsg.Sender = OnBehalfOfSender 'On BehalfAddress
etc..
-
Dec 7th, 2000, 01:02 PM
#3
Fanatic Member
...
Sorry!
Change this line in the previous post
AddEntries.Filter = "<User in question>"
to
AddEntries.Filter.Name = "<User in question>"
-
Dec 8th, 2000, 04:38 PM
#4
Thread Starter
Lively Member
Thanks very much!!
Thanks very much Lafor, sorry it took me so long to reply 
The problem with designing something completely foolproof is to underestimate the ingenuity of a complete fool. - Douglas Adams
I know the human being and fish can coexist peacefully. - GWB
I think we agree, the past is over. - GWB
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|