Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Distribute Outlook VBA

Posted on 2009-04-28
10
Medium Priority
?
452 Views
Last Modified: 2012-05-06
Hi experts,

     I am writing some vba code in Outlook and need a way to distribute this code to 6-7 users. Can u suggest me how i can do this?

Regards
Hitesh
0
Comment
Question by:hiteshgoldeneye
  • 5
  • 5
10 Comments
 
LVL 76

Expert Comment

by:David Lee
ID: 24249164
Hi, hiteshgoldeneye.

The only way to distribute VBA code in Outlook is to distribute the file that Outlook stores all of it's code in.  That file is named VbaProject.OTM.  You will find it in the folder "C:\Documents and Settings\<username>\Application Data\Microsoft\Outlook".  Unfortunately, distributing code this way is a problem if any of the people you distribute it to already have any code in Outlook.  There can be only one Outlook code file, so you have to overwrite the existing code file.  That means that any code in the overwritten file is going to be lost.  Outlook has to be closed to overwrite the file, so the best time to do this is through a login script.
0
 
LVL 13

Author Comment

by:hiteshgoldeneye
ID: 24249370
Hi, thanks for your reply, but are you sure thats the only way coz i have had a look at this site
http://www.outlookcode.com/article.aspx?id=28 
which recommends using a COM addin regarding which i have no idea.

And can i keep the code secure, that is prevent the users from viewing it?
0
 
LVL 76

Accepted Solution

by:
David Lee earned 2000 total points
ID: 24249429
Yes, I am certain that that's the only way to distribute VBA code.  COM addins do not use VBA.  They are written in Visual Basic or C.  You cannot create a COM addin in Outlook's VBA editor.  You'd have to have a full version of VB (e.g. VB6) or Visual Studio.  It may seem like a fine distinction, but your question asked about VBA and I didn't want to assume that you have access to a full-blown programming language.  If you do have access to VB, then "yes" you can accomplish the same affect by creating an addin.  In fact that's preferred.  It's also more complicated.  Addins are not as easy to write as a VBA macro.

Yes, if you create an addin, then the users cannot see the code.  
0
Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

 
LVL 13

Author Comment

by:hiteshgoldeneye
ID: 24249477
So VBA code is not secure , right? Can i password protect it somehow?
Also do you have an idea on how i can create an add in in Visual Studio?
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24249725
"So VBA code is not secure , right?"
Correct.

"Can i password protect it somehow?"
No.  The closest you can come is to make the code file read-only and hope that the users don't know how to change that.

"Also do you have an idea on how i can create an add in in Visual Studio?"
There are templates available here: http://www.slovaktech.com/outlook_2007_templates.htm
0
 
LVL 13

Author Comment

by:hiteshgoldeneye
ID: 24249846
hi thanks again, could you provide me template for outlook 2003?
0
 
LVL 13

Author Comment

by:hiteshgoldeneye
ID: 24249956
Also can i capture outlook events like ItemAdd in the add in?
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24250019
The only template I know of for 2003 is one that's for VB6.  You can find it here: http://www.microeye.com/resources/code.htm  The page says Outlook 2000 and 2002, but it works for 2003 also.

Yes, you can capture the ItemAdd event in an add-in.
0
 
LVL 13

Author Comment

by:hiteshgoldeneye
ID: 24251140
it would be very helpful if you could provide me any link relevant to developing an outlook 2003 addin using C#, if possible.
0
 
LVL 76

Expert Comment

by:David Lee
ID: 24251372
Sorry, I don't use C#, so I've never looked for a template using it.
0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Mailbox Corruption is a nightmare every Exchange DBA wishes he never has. Recovering from it can be super-hectic if not entirely futile. And though techniques like the New-MailboxRepairRequest cmdlet have been designed to help with fixing minor corr…
There can be many situations demanding the conversion of Outlook OST files to PST format and as such, there is no shortage of automated tools to perform this conversion. However, what makes Stellar OST to PST converter stand above the rest? Let us e…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses

581 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question