Customize Outlook 2000 with VBA

P

philip.kluss

Greetings,

I'm trying to come up with a solution to the following problem; any
assistance would be GREATLY appreciated, not only by me, but everyone
at the company.

I recently enabled Bayesian filtering on our mail server and in order
to learn what is spam and what is ham, it needs corrections from the
users when it falters. They do this by forwarding to the appropriate
address on the server, either (e-mail address removed) or
(e-mail address removed). The problem is that Outlook 2000 is currently set
up to forward e-mails in the body of the message instead of as an
attachment. 99% of the time this is what the users prefer. However,
in order for the e-mail server to accept and process the e-mail
correctly, they must be forwarded as attachments. I know where to make
the change, but it's extremely cumbersome and would like to program an
unused hotkey create a new message with a blank To: field, but with the
selected e-mail message attached according to the rfc822 format.
Unfortunately a macro is out of the question since Microsoft didn't
allow access to many global options in Outlook 2000, so I'm left
wondering...is there a way to do this?

I know this is a complex problem, but I'll sing the praises of whoever
can guide me through it.

Thanks.

pk
 
S

Sue Mosher [MVP-Outlook]

Why would a macro be out of the question? That's what VBA does -- allows the user to run macros.

THe real problem is that there is no supported way to distribute such macros; see http://www.outlookcode.com/d/distributevba.htm. A COM add-in would be the preferred solution.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
P

philip.kluss

I would just copy the VBAProject.otm file to all of the workstations
for distribution. I swear I read something that said options in the
Tools - Options were untouchable through the vba libraries. Did I
really make that up? If not, how can I do this?
 
S

Sue Mosher [MVP-Outlook]

Most of those options are handled by registry values that Outlook caches during the current session. So even if you change the registry value, Outlook won't use it.

Copying VBAProject.otm will overwrite any macros the user already has, and the code still won't work until the user touches the VBA environment at least once.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
P

philip.kluss

I found a post from a few years back on this newsgroup that solves my
problem. (not the distribution aspect, but i'll deal with that.) The
code is very simple. This solution is great because I can keep my
previous forwarding options intact.

-------------------------------------------------------------------------
Rather than forwarding, this code creates a new message with the
selected
message included as an attachment:

Dim objAtts As Outlook.Attachments, objMsg As Outlook.MailItem,
objNew
As Outlook.MailItem

Set objMsg = ActiveExplorer.Selection.Item(1)
Set objNew = Application.CreateItem(olMailItem)
Set objAtts = objNew.Attachments
objAtts.Add objMsg
objNew.Display
 

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