none
Sending email using MAPI causes error on 'ResolveName' function in Window7

    全般的な情報交換

  • Hi Guys,

    In Windows XP as well as in Vista, it was possible to compose and send out an email using MAPI with the default email application MS Outlook,  Outlook Express or anyother. But in Windows7, it is not possible to send out mails using MAPI. The ResolveName function call prompts an error.  I found that ResolveName function is deplicated.  Is there anything else can fix this problem?

    Following is a sample of the code

    KKMapiSession = CREATEOBJECT('MSMAPI.MAPISession')
    KKMapiMessage =
    CREATEOBJECT
    ('MSMAPI.MAPIMessages')
    KKMapiSession.SignON()
    KKMapiSession.DownloadMail = .False.
    KKMapiMessage.SessionID = KKMapiSession.SessionID
    KKMapiMessage.Compose()
    KKMapiMessage.RecipIndex = 0
    KKMapiMessage.RecipDisplayName = 'MyName'
    KKMapiMessage.RecipAddress =
    'MyName@hotmail.com'
    KKMapiMessage.MsgSubject = 'Subject'
    KKMapiMessage.MsgNoteText = 'Message Body'
    KKMapiMessage.AddressResolveUI = .False.
    KKMapiMessage.RecipType = 1 *> MapToList
    KKMapiMessage.AttachmentIndex = 0
    KKMapiMessage.AttachmentName = 'Detailed AP Activity.pdf'
    KKMapiMessage.AttachmentPathName = 'C:\Detailed AP Activity.pdf'
    KKMapiMessage.ResolveName()
    KKMapiMessage.Send(.false.)
    KKMapiSession.signoff()

    Any idea how to resolve "ResolveName" issue in Window7

    2009年8月25日 14:56

すべての返信