By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,960 Members | 2,246 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,960 IT Pros & Developers. It's quick & easy.

Send email - capture ProfileName from MAPI

P: n/a
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
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
tav
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..."

ja*********@hotmail.com (Jay McGrath) wrote in message news:<e5**************************@posting.google. com>...
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

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.