Outlook VBA / Macros in network envoronment

R

Raymond Geering

Hello,

Actually I want to prevent sending mails with no subject. The
VBA code is no problem, but I'm wondering if there's a way
to deploy the macro to all users in the network.

Otherwise I'd have to create the macro on every PC
manually which would cause another problem because
only a few users can digitally sign the macro (we have set
the macro security to very high so that only trusted
macros can be run).

Where does Outlook store it's VBA projects? Probably
it would be possible to simply copy/paste it (?)

Any help is very appreciated.

/Ray
 
R

Raymond Geering

Raymond Geering said:
Where does Outlook store it's VBA projects? Probably
it would be possible to simply copy/paste it (?)

I found out that it's a file called VBAProject.OTM, but
simply copying it doesn't do the trick yet because
Outlook doesn't know that it shall use this file unless
you open the VBA editor.

Does anybody have an idea how to overcome
that problem?

/Ray
 
M

Michael Bauer

Hi Raymond,
Where does Outlook store it's VBA projects?

C:\Documents and Settings\[UserName]\ApplicationData\Microsoft\Outlook

The project is stored in a .otm file.
Probably
it would be possible to simply copy/paste it (?)

Possible yes - but it will overwrite any existing code.

The best way to distribute your code is to write a COM-Addin.
 
R

Raymond Geering

Michael Bauer said:
Where does Outlook store it's VBA projects?
C:\Documents and Settings\[UserName]\ApplicationData\Microsoft\Outlook
The project is stored in a .otm file.
Thanks
Probably
it would be possible to simply copy/paste it (?)
Possible yes - but it will overwrite any existing code.

I found out that it won't work unless you open the editor:
http://support.microsoft.com/kb/290780/EN-US/
The best way to distribute your code is to write a COM-Addin.

Ok, but do you have a hint where to start if you haven't
ever written a com-addin? I doubt there's a tutorial
"COM-addins for dummies"? Well, I'll do some research
in google and in the technet, so I hope I'll find a solution.

/Ray
 
M

Michael Bauer

Hi Raymond,
Ok, but do you have a hint where to start if you haven't
ever written a com-addin?

I started with the sample "ItemsCB" from www.microeye.com.

For developing COM components you need e.g. Visual Basic, maybe it is
possible with the Office Developer Edition. From within your VBA-IDE is
isn´t possible.
 
R

Raymond Geering

Michael Bauer said:
I started with the sample "ItemsCB" from www.microeye.com.

Thanks, I'll have a look at it.
For developing COM components you need e.g. Visual Basic, maybe it is
possible with the Office Developer Edition. From within your VBA-IDE is
isn´t possible.

I still have VB 5.0 at home (but not installed currently).... this version
is probably a bit outdated ;)

/Ray
 
K

Ken Slovak - [MVP - Outlook]

Aside from Michael's recommendation of ItemsCB, which is the standard COM
addin template we recommend you can look at the COM addins information at
www.outlookcode.com

There's also an online chapter about COM addins from an old book of mine
that you can download or read in PDF format at
http://www.slovaktech.com/Files/3315_Chapter07.pdf

You can use VB 5 to create COM addins, you just can't use the Designer that
you would use in VB 6. In VB 5 you'd create a class module to handle the
Implements IDTExtensibility2 stuff and you have to manually handle the COM
addin registration.

Microeye has an Outlook KB article section that is also accessible from the
Resources page. Some of those KB articles show examples of COM addins in VB
with both VB 5 and 6.
 
R

Raymond Geering

Ken Slovak - said:

Thanks for the links, I'll have a look at it.
You can use VB 5 to create COM addins, you just can't use the Designer
that
you would use in VB 6. In VB 5 you'd create a class module to handle the
Implements IDTExtensibility2 stuff and you have to manually handle the COM
addin registration.

Ok, it would have been easier with VB6 in that case ;)

Maybe I'll also find a download. I noticed that there are free
downloads available but the ones I saw didn't quite fit my
needs.
Microeye has an Outlook KB article section that is also accessible from
the
Resources page. Some of those KB articles show examples of COM addins in
VB
with both VB 5 and 6.

Yes, I already had a short look at those yesterday. Thanks for
your information.

/Ray
 

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