View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Ron de Bruin Ron de Bruin is offline
external usenet poster
 
Posts: 11,123
Default Email from Excel; MS warning "program is trying to send mail on your behalf"

Hi KR

See
http://www.rondebruin.nl/mail/prevent.htm

I don't know about the UserID


--
Regards Ron de Bruin
http://www.rondebruin.nl


"KR" wrote in message ...
Using Excel 2003 and Outlook 2003

I just tested code from http://rondebruin.nl/mail/folder3/smallmessage.htm
in my workbook; while I don't have it fully tweaked to meet my needs (more
on that below) the first problem I ran into is that it pops up a message
window that says "program is trying to send email on your behalf; do you
want this" with a progress bar (I'm not sure if the progress bar is a delay
in which to respond, or if it is tracking other stuff going on in the
background, like Outlook still opening in the background). The user then has
to click "yes" to send the mail.

My workbook is a tracking log for our company, with various pieces of
product and their status- who is responsible for what, and when. Right now,
these people are called or emailed manually based on the information in the
workbook, so I offered to try to help automate the process by just sending
emails automatically based on information uploaded into the workbook from
other data sources. Having the user respond to these email prompts isn't as
efficient as I'd like, when my goal is to automate. I understand the reason
for this warning (to keep a hostile macro from sending email or spam without
your knowledge) but is there any way with a self-cert or other method for
Excel/Outlook to recognize that you are doing this intentionally, and not
give the warning? When the macro is run weekly, this could be dozens of
emails. My less desirable alternative (because it would be a bunch more
code) would be to save all my email messages to a text file, then trigger an
outlook macro to open that file and cycle through and send out the emails.

The other question I have, if anyone knows- does the code on Ron's page
require a full email address, or is there anything I can do to resolve
internal email by UserID? When I type my UserID in Outlook it knows who to
send it to, but so far I haven't gotten this code from Ron's page to do the
same. Not sure if I can use UserID via VBA, or if I am stuck with a full
address (myName at company.com). I have everyone's userID in my workbook,
but not their external email addresses.

Thanks!
Keith

--
The enclosed questions or comments are entirely mine and don't represent the
thoughts, views, or policy of my employer. Any errors or omissions are my
own.