Collect data using Outlook

G

*Glen*

Can anyone explain to me how to create a command button on a form with an
associated macro that when clicked will send an email to a distribution list?


I understand how to collect data from outlook using an http or inforpath
form. However, my intent is to make my database foolproof so that once it is
given to the user, he will be able to click on command buttons rather than
have to click on Access toolbars.

Thanks in advance!

*Glen*
 
G

ghetto_banjo

you can use the SendObject action in either a Macro or VB Code for the
OnClick event of the command button.


here is the syntax for the vb code

DoCmd.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc,
Subject, MessageText, EditMessage, TemplateFile)



the "funny" thing about the SendObject command, is that you don't
actually have to send an object (report, table, etc). you can just
omit those values (keep the commas) and you can just send an email by
itself. Set EditMessage=Yes if you want the user to be able to edit
the email before it sends.

note that you will get an annoying warning message like "another
application is trying to send mail on your behalf" from outlook.
there is a program called ClickYes out there that gets around this.
 
G

*Glen*

you can use the SendObject action in either a Macro or VB Code for the
OnClick event of the command button.

here is the syntax for the vb code

DoCmd.SendObject(ObjectType, ObjectName, OutputFormat, To, Cc, Bcc,
Subject, MessageText, EditMessage, TemplateFile)

the "funny" thing about the SendObject command, is that you don't
actually have to send an object (report, table, etc).  you can just
omit those values (keep the commas) and you can just send an email by
itself.  Set EditMessage=Yes if you want the user to be able to edit
the email before it sends.

note that you will get an annoying warning message like "another
application is trying to send mail on your behalf" from outlook.
there is a program called ClickYes out there that gets around this.


Thanks for your reply. I apologize for not being clear in my original
email. I want the user to click on a form command button, outlook
opens with the html form, the user then adds people to the
distribution list. When someone on the distro list receives the
email, they will be able to update the form, send the email to the
original sender, and then the new data is automatically updated into
the table.

I have done this by opening a form, going to the "external data" tab,
to the "collect data section", and then "create email." The only
problem with this is that when I eventually deploy the database, I do
not want the user to have access to the toolbars; he will only use the
form for navigation.

Thanks for your help!

Glen
 

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