How do I by-pass the security when automatically emailing in Exce.

G

Guest

I have updated to Office 2003 and now when I try to email using a VBA excel
macro, I get a message box saying "A program is trying to automatically send
email on your behalf". How do I disable this feature? I tried adding a key
to my registry, but that does not seem to work.
 
G

Guest

Is it possible that MS actually did not think "Hmmm, maybe some users have a
legitimate reason for wanting to do this, and aren't sophsticated
programmers, so maybe we should have a simple setting to be able to turn this
off?"

Or did they just think "We are experienced programmers, so to hell with
anybody who's not. After all, what are we here for, to make people's lives
easy?"

Yeah, I'm pretty frustrated. I shouldn't have to dedicate a second computer
just to running OLDER versions of software that don't make my life miserable,
but I guess I will have to. Thank you, Mr. Gates, for a cure that's worse
than the disease.
 
S

Sue Mosher [MVP-Outlook]

Microsoft did indeed think of that. If you write the macro in Outlook VBA
(instead of Excel) and derive all objects from the intrinsic Application
object, it won't trigger security prompts.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Dear Sue:

I notice that sometimes your answers are not helpful, but add another level
of complication, confusion, and frustration to those seeking beginning or
intermediate answers. You have done so to me and to the previous poster, not
withstanding his rudeness. Using long words without definition (e.g.,
"intrinsic application objects") is not helpful. To many like me you might
as well say "Bilateral arabesque." I am glad you know a lot about MS
products. But please try to make it understandable to people like me. it
needs to be free of specialized jargon and more detailed than "Go read a book
 
D

Dmitry Streblechenko \(MVP\)

"intrinsic application object" - a variable called "Application" that is
available to your script without you having to define and initialize it.
E.g. if you run the following script in the Outlook VBA editor

MsgBox Application.Name

you will get "Outlook" even if you do not define the Application variable
anywhere. On the other hand

dim App
set App = CreateObject("Outlook.Application")
MsgBox App.Name

will produce the same result, but in this case the App variable is
explicitly defined and initialized. It is not intrinsic.
If you use the first version of the script, Application object is not
subject to the security prompts (since Outlook already knows it is running a
script in its own VBA editor). The second version will produce security
prompts since it is explicitly initialized by CreateObject and Outlook has
no idea that the call came from within its own VBA environment, it assumes
the worst and hands out a crippled version.
In Outlook VBA, Application intrinsic object referes to an instance of the
Outlook.Application object; in Word VBA, it will point to Word.Application,
etc.

Not to be rude, but since this is a developers newsgroup, it is assumed that
people here have knowledge about the Outlook environment and software
development in general. It is perfectly fine not to know some things (I am
still learning about some Outlook features after working with it for years),
but all you need to do is *ask*.

In this case Sue's answer was as precise as it gets. Calling her answers
"not helpful, but add another level of complication, confusion, and
frustration" is really an insult to her. I am sure that thousands of Outlook
developers who were spared countless hours of complication, confusion, and
frustration by reading her posts will agree with me.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
J

Jim Vierra

Doug
- shame on you. Where is your patience. Sue answered the question in a
forum for programmers and those who want to program in VBA. Her use of
"intrinsic" Application object is just exactly what it's called. In english
"intrinsic" means, in simple terms, "built-in". This is the first thing you
must understand to write ANY code in VBA for Office.

Sue was also absolutely correct in stating that the security issue is
by-passed when the script runs in Outlook. This is an important improvement
in mail security. When you need to go outside of this box then you had
better be a well disciplined and studied programmer so you can take on
things like "signed code", COM, CDO and MAPI.

All things are possible but VBA is only intended to allow users and
programmers to script common tasks. In order to be effective at doinf this
you need to learn the rules of the app you are working from.

I have been writing code, both inside and outside of the Application, since
the first thing called MS Office. I still don't have a complete picture of
the product. SUe has spent more time on Outlook and Office than almost
anyone I have seen. She knoows more about how things should be done than
you or I but it is not her reponsibility to teach programming. I believe
this forum is about finding answers to howtos when scripting. The MVPs here
are extremely helpful. Each has his/her own style and strengthss. It is up
to us to listen and, hopefully, understand.

These forums are a great resource to users/programmers of Office
technologies so be a little patient with the experts as they are probably
quite overloaded.

Jim says - go read a book first. I recommend reading the MS Office
developer books or others like Sue's book.

Intrisic my a-a-a.

And STOP barking!!!
 
J

Jim Vierra

Doug -

I tested Sue's method and it works just fine. If I open an Ecel worksheet
from inside of Outlook and the email it it does not cause the security
warning. Of course this means that the user will have to start the
spreadsheet from an Outlook button or you will have to use CDO or MAPI to
send the sheet without touching Outlook.

There ae many examples in teh scripting clinic on ow to send an email by
script using MAPI. These can be copied and used pretty much as they are.

The real choice of a solution lies in knowing exactly what problem you are
trying to overcome. If you are explicit as to process and desired outcome
than the best solution can be recommended. Scripting an Outlook mail
session from inside of Excel will always produce a warning. This is by
design and for security reasons.
 
J

Jim Vierra

Now there's some Redemption in that...

And Redemption is one way around the nagging security issues of Outllok.

How come my MsgBocks Application.Name always says "@#$%^&*&^/]"?
 
S

Sue Mosher [MVP-Outlook]

One can only do so much mind reading, I'm afraid. I've also been yelled at
for providing detailed step-by-step instructions, because the person to whom
I was replying though I was condescending.

I'm always happy to answer specific questions in the detail necessary, but
until someone asks, I can't guess what detail that might be. If there's
something in particular that you were looking for more help with, please ask
again.

I will admit to one prejudice -- against laziness. I'm not going to write
code to order in a newsgroup (though others here may enjoy doing that, and
that's fine with me). I'd rather show someone how to fish than catch their
dinner for them.
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
J

Jim Vierra

Sue's right. Tese groups are for programmers and would-be programmers.
Programming requires discipline and the ability to do a certain amount of
research. When the documentation, testing and examples fail to ellicit the
solution then it's time to ask someone.

Poorly worder questions and questions that show a lack of even reading the
online help make it very difficult for anyone to understand the exact nature
of the question. The result is that the responder is forced to assume that
the poster knows what is in the documentation and is only asking for a
simple pointer.

I ask dumb questions as much as anyone. In many if not most cases the short
answer does put me on the righ track. If I don't undersatnd the terminology
then it is my responsibility to go "kook it up"
 
G

Guest

Even easier there is an add-in called outlook advanced security 2003, it's
free secure and a lot easir too use, go search for it and stop berating
someone who is trying to help you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top