sendmail

F

fiona

Hi All,

I have had a look at the "sending email" link posted a few times in this
forum and it is not quite what I want to do.

I would like to get a document to send an alert message to an administrator
without the attachment or, at worst, with the attachment as a link not a
document.

In Excel I would use the "sendmail" command, but I am not sure what the
correct command is in Word. I think some users have Lotus Notes as their
default email program (being changed, but still a default on some people's
computers). I'm not sure if sendmail is the correct term to use or if I have
to use a routine to call outlook. I'm pretty sure outlook will be running as
it is now the "proper" email program for the company. I'm using Word 2002,
but others are using Word 2000.

Thanks for any ideas,

Fiona
 
J

Jean-Guy Marcil

fiona was telling us:
fiona nous racontait que :
Hi All,

I have had a look at the "sending email" link posted a few times in
this forum and it is not quite what I want to do.

I would like to get a document to send an alert message to an
administrator without the attachment or, at worst, with the
attachment as a link not a document.

Do you mean that a document should send a second document that will be the
actual alert message, or the active document has to send itself as an alert,
but not as an attachment?
In Excel I would use the "sendmail" command, but I am not sure what
the correct command is in Word. I think some users have Lotus Notes
as their default email program (being changed, but still a default on
some people's computers). I'm not sure if sendmail is the correct
term to use or if I have to use a routine to call outlook. I'm
pretty sure outlook will be running as it is now the "proper" email
program for the company. I'm using Word 2002, but others are using
Word 2000.

The link at
http://word.mvps.org/faqs/interdev/SendMail.htm
mentions that if you are dealing with multiple email softwares, you have to
use the RoutingSlip method. I do not think you can do anything else.

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
F

fiona

Jean-Guy

I would like it to send an alert message with no attachment at all. The
message would just be in the subject line, something along the lines of "I
have filled out a travel request". The macro attached to the template
already stores the document in a travel folder so sending itself to the
recipient is redundant, and I would like to avoid cluttering people's email
inboxes. We have pretty strict limits here.

I will go through the send mail FAQ again and use this code to overcome any
problems associated with having two email systems installed. Could you
please tell me why the line

Set oOutlook...

has the little "o" at the start of Outlook? I am pretty new to VBA, really
only tinkered with it.

Thanks,

Fiona
 
J

Jean-Guy Marcil

fiona was telling us:
fiona nous racontait que :
Jean-Guy

I would like it to send an alert message with no attachment at all.
The message would just be in the subject line, something along the
lines of "I have filled out a travel request". The macro attached to
the template already stores the document in a travel folder so
sending itself to the recipient is redundant, and I would like to
avoid cluttering people's email inboxes. We have pretty strict
limits here.

I do not understand why you are doing this from Word.... You want Word to
send an email message that has nothing to do with the currently active
document? (No attachment, no body text, etc.) This is like asking Outlook to
produce a pie chart...
I will go through the send mail FAQ again and use this code to
overcome any problems associated with having two email systems
installed. Could you please tell me why the line

Set oOutlook...

has the little "o" at the start of Outlook? I am pretty new to VBA,
really only tinkered with it.

Above that line, there are some Dim statements.
One of those:
Dim oOutlookApp As Outlook.Application

Dim statements create variables to hold data or objects.
In this case, oOutlook will hold an instance of Outlook. The little "o"
tells you it is an object variable. It is a common naming practice.
Like
Dim bStarted As Boolean
uses the little "b" to tell you it is a Boolean variable (True/False
variable)

--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 
F

fiona

I know it's a bit odd, and not really what Word was invented for, but I would
like to remove this step from people. This is for travel arrangements and
some of the people here assume that if you fill out the request and save the
file, others will magically know. I would like to take away the possibility
that they will forget to actually tell the admin person responsible for
organising the travel arrangements. Some of the people I work with are not
very computer savvy (and won't admit it) so it is best to take away the
choice, if possible.

If it is not possible, then they will just have to learn.

Thank you for explaining the naming convention, it is good to know so I can
write understandable code

fiona
 

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