Best way to handle Outlook VBA code changes with users

I have found a solution that we have implemented with each user's outlook from the following question:

Q27835522

Going forward if we want to make changes we will now have to go and edit each users VBA code.  Is there any way to have some code that would check for a file in a public file location and "update" the code?  Say if we wanted to add/edit some conditions from the original code, or perhaps have the code check some sort of text table to determine conditions to check for? This would permit multi user changes without having to edit Outlook's VBA code for each work station.

Thank you.
thandelAsked:
Who is Participating?
 
p912sCommented:
I've tried several ways to accomlish this and the simplest was to replace the code on the computer with a script.

What you need to replace on the users computer is the VbaProject.OTM file. That's where the code is stored that you have added to Outlook.

This is how i do it in a batch file named install.cmd.

c:
cd %appdata%\Microsoft\Outlook
copy "S:\IOBoard\project\VbaProject.OTM"
pause
I have it pause so the user can see if the script copied the file sucessfully.

Process:
close Outlook
run batch file
open Outlook
done!
HTH

Scot
0
 
Chris BottomleySoftware Quality Lead EngineerCommented:
There is nothing we can do with the code itself but we can for example store the data values on the server, upload them when the script runs and process the user specific keywords that way .. and if that will help then we can certainly proceed on that basis.

Chris
0
 
thandelAuthor Commented:
So do I understand this correctly but I would have to first manually edit the code on a computer, copy that .OTM file and then distribute that same .OTM with a batch?

Is it possible to edit a .OTM file without having to use the Outlook VBA editor?
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
Chris BottomleySoftware Quality Lead EngineerCommented:
I thought the intent was to change the conditions run by the code and this is perfectly feasible without code changes via a commonly named data file in the user area.

Chris
0
 
p912sCommented:
So do I understand this correctly but I would have to first manually edit the code on a computer, copy that .OTM file and then distribute that same .OTM with a batch? Yes

Is it possible to edit a .OTM file without having to use the Outlook VBA editor? No
0
 
thandelAuthor Commented:
Ok perhaps I can have a batch file that on startup sees if there is a replacment OTM file and then if so replaces it.  One final question, if the project is protected will the protection remain with the OTM replacement?
0
 
Chris BottomleySoftware Quality Lead EngineerCommented:
Okay message received i'll leave you to it.

Chris
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.