• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 420
  • Last Modified:

Push VBA code out to everyone in my company

Is there a way to push some VBA code out to all of my users (using GP or regestry edits or anything)?

I want to prevent users from sending messages with no subject.  I have some code that does this on my local computer, but I want to push it out to everyone... how can I do this?

Thanks

Doug
0
dougshepard
Asked:
dougshepard
  • 8
  • 5
1 Solution
 
David LeeCommented:
Greetings, dougshepard.

There is no good way to do this.  Outlook VBA code resides in a file called VbaProject.OTM.  The file is in a format that cannot be read/written from outside Outlook.  (Ok, I suppose it could be done if someone knew the file format, but apparently it's a closely guarded secret.)  If you are certain that the folks you want to copy the code to do not have any other macros, then you could overwrite this file from a login script.  I thought I'd seen a third-party add-in that managed merging code into Outlook, but when I looked for it for another question I couldn't find anything.  Maybe I was hallucinating.  Slipstick.com maintains a list of third-party add-ins and utilities for Outlook and nothing is listed there.

Cheers!
0
 
dougshepardAuthor Commented:
I replaced that file but it only "kicks in" if I go into the VBA editor in Outlook on a particular machine.  Any ideas?

Doug
0
 
David LeeCommented:
Are you saying that none of the code works unless you are in the VB editor?
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
dougshepardAuthor Commented:
I copied the file to someone's computer but it still didn't make them have a subject.  Then I went to their computer and opened the VBA editor in Outlook.  Then I closed it.  From that point on it would no longer allow a blank subject.

At least I think that's what happened...  Seem possible?

Thanks

Doug
0
 
David LeeCommented:
Doug,

Yes, it seems possible.  I'm just not seeing any clear reason why.  
0
 
David LeeCommented:
Doug,

Any progress?
0
 
dougshepardAuthor Commented:
I haven't had any time to address.  I will try to in the next few days.

Thanks

Doug
0
 
David LeeCommented:
Any update, Doug?
0
 
David LeeCommented:
My initial post answered the poster's initial question, so I believe I deserve some credit.
0
 
dougshepardAuthor Commented:
From: http://www.outlookcode.com/d/vb.htm

You can copy the VBAProject.otm file to another user's machine but the macros won't run until the user has actually used one of the Tools | Macro commands. See Distributing Microsoft Outlook VBA Code for other thoughts and techniques on distributing VBA macros.

Even though you can copy the VBAProject.otm file, it's still not a supported method for distributing Outlook macros company-wide. The recommended method is to create an Outlook COM add-in.

http://www.outlookcode.com/d/comaddins.htm

Doug
0
 
David LeeCommented:
Doug,

A COM add-in isn't VBA code.  COM add-ins are written in VB or C and require much more programming skill than an Outlook macro.  
0
 
dougshepardAuthor Commented:
Right...  I included that just for reference.

I really just wanted to share this: "You can copy the VBAProject.otm file to another user's machine but the macros won't run until the user has actually used one of the Tools | Macro commands."

Since that exact issue is the reason I left this question open for so long...

Thanks

Doug
0
 
David LeeCommented:
Got it.  Good point.  Thanks for sharing.
0

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 8
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now