• Subject: Re: Access 2000 / Outlook 2007
  • Author: Tim Freeman
  • Date: 19 Sep 2007
  • References: 1 2 3 4 5
"Sue Mosher [MVP-Outlook]" wrote:

> Outlook should be able to resolve IsEmailAddress to a recipient if it is a straight SMTP address, but if you're passing a name that has to be resolved, a login is necessary. Otherwise, Outlook may not know what address lists are available for name resolution. You can add an objOlns.Login statement to either use a specific profile or prompt the user to choose one.
>
> --
> Sue Mosher, Outlook MVP
> Author of Microsoft Outlook 2007 Programming:
> Jumpstart for Power Users and Administrators
> http://www.outlookcode.com/article.aspx?id=54
>
>
> "Tim Freeman" <TimFreeman@discussions.microsoft.com> wrote in message news:9F0F8163-F0A3-406D-966F-D41B266DA058@microsoft.com...
> >
> > Thanks Sue, I was replying to BH as to why the code failed but mine failed
> > on the objOutlookMsg.Recipients.Add lsEmailAddress statement. It quite
> > happily creates the email and displays it afterwards but unless the user is
> > logged in, the recipient cannot be created.
> >
> >> > Set objOutlook = CreateObject("Outlook.Application")
> >> > Set objOlns = objOutlook.GetNamespace("MAPI")
> >> >
> >> > Set objOutlookMsg = objOutlook.CreateItem(olMailItem)
> >> > If Len(lsEmailAddress) > 0 Then
> >> > objOutlookMsg.Recipients.Add lsEmailAddress
> >> > End If
> >> >
> >> > It failed if I did not have Outlook open but works fine with Outlook open.
>
>
17 Sep 2007Access 2000 / Outlook 2007.bh
17 Sep 2007\ Re: Access 2000 / Outlook 2007.Sue Mosher [MVP-Outlook]
18 Sep 2007   \ Re: Access 2000 / Outlook 2007.Tim Freeman
All times are in (US) Eastern Daylight Time (GMT -4:00)