Problem obtaining correct smtp addie

C

craigburns

Greetings,

I'm a newbie in this Outlook stuff, so go easy on me ;o)

I have an html web form that I'm automating using the GAL. Click on a
button, the GAL comes up, do a search on a name it propogates fields.
Specifically the user name and smtp address.

I've finally got it working... mostly. I'm now getting user name, and A
smtp address propogating to the correct fields... just not the RIGHT
smtp address. It's obvious to me where the mistake is, just not how to
fix it.

I'm hoping someone can help asap. Hopefully this is an easy one.

Here's the code:

_______________________________________________

<SCRIPT LANGUAGE=VBSCRIPT>
Sub NAMESBTN_OnClick()
Dim AddressLists
Dim AddressEntry
Dim objRecipColl
Dim blnGALFound
Dim managerName
Dim partnerName
Dim managerEmail
Dim partnerEmail
//Dim partnerNamePractice
Const CONST_GAL_ID =
"00000000DCA740C8C042101AB4B908002B2FE18201000000000100002F00"
Set objCDOSession = CreateObject("Mapi.Session")
objCDOSession.Logon ,,True,False
Set objRecipColl = objCDOSession.AddressBook (,"Select
Names",,,2,"Manager Name","Partner Name")
Set window.addTicklerForm.managerName.value = objRecipColl.Item(1)
Set window.addTicklerForm.partnerName.value = objRecipColl.Item(2)

Set objGAL = objCDOSession.AddressLists("Global Address List")
Set objAddressEntries = objGAL.AddressEntries

set window.addTicklerForm.managerEmail.value =
objAddressEntries.Item(1).Fields(&H39FE001E)
set window.addTicklerForm.partnerEmail.value =
objAddressEntries.Item(2).Fields(&H39FE001E)

//Set window.addTicklerForm.partnerNamePractice.value =
objRecipColl.Item(3)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top