While  trying  to access the "Global Address Book" or trying  to login to
the
MAPI Session using vbsccript in Outlook, I am facing some problems.

The  Code is as follows :
        ' Log into the Outlook Session

        Set objSession = CreateObject("MAPI.Session")
        Set oNamespace = Application.GetNamespace("MAPI")
        objSession.Logon oNamespace.CurrentUser, "", False, False, 0
        
Next I am trying to access the address book and assign the selected
recipient.

        Set selectedRecipient = objSession.AddressBook (Nothing, "Select
Recipient For E&T:", False, False, 1, ButtonText, "", "", 0)

Addressbook dialog pops up, and on selecting a recipient and pressing OK
it throws the following error for the "MAPI Version 1.0", but works with
the higher versions.

Error:
"Type mismatch unable to coerce parameter value Outlook cant translate
your string."

Please note that, for any combination of the parameters in the AddressBook
function results in the same error.

Any alternative solution for the same? Or any particular way to login
to the MAPI Session in 1.0?


Regards,
Raghavendra M.N.

_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Archives:               http://www.swynk.com/sitesearch/search.asp
To unsubscribe:         mailto:[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]

Reply via email to