Connecting Tech Pros Worldwide Help | Site Map

Send email - capture ProfileName from MAPI

Jay McGrath
Guest
 
Posts: n/a
#1: Nov 12 '05
Help - trying to send a simple text email with with as little user
intervention.

I am trying to create a button in my Access application that will
automatically send a simple text email. It works except that I have
two warning nuisances:
1) Program is trying to access email Addresses you have stored in
Outlook. Allow access for ...
2) A program is trying to automatically send email on your behalf ...
Heck, I am only trying to a send a simple text message to an email
stored in a field, not access addresses in Outlook. OK, we don't want
hackers making havic ... I understand.

My concern is in specifying a generic ProfileName. Not everybody is
going to have the same logon ProfileName. If you incorrectly specify
the Logon ProfileName, you will be prompted by Outlook to select a
Profile. Could I let a user specify a profile name in the windows
Outlook dialog box the first time, capture that selection, store it in
a field and use that captured profile name in future logon?

First time ...
Dim ObjSession As MAPI.Session
Set ObjSession = CreateObject("Mapi.Session")
ObjSession.Logon ProfileName:= strProfile

User is prompted for Profile (srtProfile = "") ... user selects
"Outlook". The string "Outlook" is stored in a field. profileName =
"Outlook"

Second time and future times ...
strProfile = Me.profileName
Dim ObjSession As MAPI.Session
Set ObjSession = CreateObject("Mapi.Session")
ObjSession.Logon ProfileName:= strProfile

Thanks in advance for any advice

Jay McGrath
tav
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Send email - capture ProfileName from MAPI


try setting outlook express as your default email program in the tools
section of the internet explorer. outlook express does not require a
profile. also, go to tools, options, security tab in outlook express
and remove the check re: warning if other applications..."

jay_mcgrath@hotmail.com (Jay McGrath) wrote in message news:<e52e422e.0312140019.605d7962@posting.google. com>...[color=blue]
> Help - trying to send a simple text email with with as little user
> intervention.
>
> I am trying to create a button in my Access application that will
> automatically send a simple text email. It works except that I have
> two warning nuisances:
> 1) Program is trying to access email Addresses you have stored in
> Outlook. Allow access for ...
> 2) A program is trying to automatically send email on your behalf ...
> Heck, I am only trying to a send a simple text message to an email
> stored in a field, not access addresses in Outlook. OK, we don't want
> hackers making havic ... I understand.
>
> My concern is in specifying a generic ProfileName. Not everybody is
> going to have the same logon ProfileName. If you incorrectly specify
> the Logon ProfileName, you will be prompted by Outlook to select a
> Profile. Could I let a user specify a profile name in the windows
> Outlook dialog box the first time, capture that selection, store it in
> a field and use that captured profile name in future logon?
>
> First time ...
> Dim ObjSession As MAPI.Session
> Set ObjSession = CreateObject("Mapi.Session")
> ObjSession.Logon ProfileName:= strProfile
>
> User is prompted for Profile (srtProfile = "") ... user selects
> "Outlook". The string "Outlook" is stored in a field. profileName =
> "Outlook"
>
> Second time and future times ...
> strProfile = Me.profileName
> Dim ObjSession As MAPI.Session
> Set ObjSession = CreateObject("Mapi.Session")
> ObjSession.Logon ProfileName:= strProfile
>
> Thanks in advance for any advice
>
> Jay McGrath[/color]
Closed Thread