How do I deploy an Outlook macro - no exchange server
Hi,
The group I work for uses MS Outlook, however there's no Exchange server. Users have POP accounts and use the calendar locally.
I have a macro I wish to distribute to that user base, but unlike VB itself there doesn't sem to be a way to "make" anything out of the macro that I could distribute.
This macro has a few custom forms, modules, and a class and it all WORKS fine, I just don't see a way to hand it off to another user and say "Here, load this up and have at it." etc.
One other thing - while the macro "runs" ok, even when I have the VBE closed, after it gets done running it opens up the VBE and just sits there - is there anyway to make THAT stop?
Re: How do I deploy an Outlook macro - no exchange server
Welcome to the forums.
Sounds like your macro code has a possible error?
Re: How do I deploy an Outlook macro - no exchange server
If there is an error it's not saying anything about it and all things it was supposed get done do in fact get done. When the VBE comes up it's not in pause mode or in need of hitting the "stop" button. I'm using the "End" keyword - is that a no-no in VBA?
Re: How do I deploy an Outlook macro - no exchange server
Then "End" keyword is whats making it open the IDE. Its a big no-no in both VBA and VB 6. There should be no reason to use End in VBA.
Re: How do I deploy an Outlook macro - no exchange server
Sorry all, but to BUMP the original question, how do you go about distributing a macro to a stand alone outlook installation then ?
Re: How do I deploy an Outlook macro - no exchange server
One way is to copy the VbaProject.OTM file from one system to another. The VbaProject.OTM contains all the VBA code. This will work for 2003 but for 2000 and 2002 you need to open the VBA editor in order to link the Application_ events to fire.
The location of the VbaProject.OTM file is:
Userprofile\Application Data\Microsoft\Outlook\VBAProject.OTM
Another would be to use manually export each .cls, frm, .bas file and copy them over and do a Import for each one, but its allot of work if you have allot to do.
Finally, there is the Office Profile Wizard.
Sorry for missing the second part of the initial post. :)
Re: How do I deploy an Outlook macro - no exchange server
So if I were to do an executable that were to merely copy the OTM file to the right place on a users PC, and if they had macro's enabled, all would be well (assuming 2003 and above)?
Re: How do I deploy an Outlook macro - no exchange server
Yes and no. If they dont have any Macro code then its all good. But if they have their own or previously written macro code then when you copy over the VBAProject.OTM file it will wipe out whatever they had before. What you could do is check if the file exists and if it dont then do the file copy. If it does exist then open the Outlook VBA IDE and msgbox to the user that it needs to be manually copied into the VBA IDE class by class, module by module, and form by form.
Re: How do I deploy an Outlook macro - no exchange server
Thanks you guys - my research led me to similar conclusions on the distribution. I was hoping one of the guru's might've had a trick but even so it's good to have the confirmation. Thx again!