PDA

View Full Version : Help needed with 'installing' macro's



Aphexed
08-10-2005, 04:53 AM
Hi All,

I am pretty new to macro's (esp. outlook) so sorry if this is a stupid question. I have tried to search the forums, but I dont really know what I am looking for.

I am reasonably confident with programming and VB though.


I have converted a program I have written in VB to VBA. I have this program working perfectly in my version of outlook (2003). It is a small program that monitors and grabs stats for a few email games I play.

On my computer the half the code lives in: -

a) Project1 -> Microsoft Office Outlook Object -> ThisOutlookSession -> Application_ItemSend

The other half lives under the buttons in

b) Project1 -> Forms -> UserForm1 -> cmdbuttons

I want to distribute this to my friends (all at least semi computer literate) with minimum fuss. I just dont know how to do that. I have tried exporting the .OTM file - This moves part A of the code, but does not put it in the ThisOutlookSession for that computer - so the code is there but it doesnt run :(
I also tried to import the .FRM and .CLS file with no success at all.

Ideally I would like to have an installer (I could write this in VB if needed) and the config files in either a zip or rar which I could email out to people then they unzip, run the .exe and that is it.

I am not sure how practical this is, so some user interaction is okay as long as I can write simple instructions for them to follow.

They have already refused to cut and paste the code and recreate the forms themselves.

There must be a way to do this. If someone could point me in the right direction that would be really great :)

I have also checked
http://support.microsoft.com/?kbid=290779 (http://support.microsoft.com/?kbid=290779)
and that says it cant be done, however i nearly have it working. It is just now it will not recognise Right() or Mid() and a whole slew of other stuff....

anyone got any ideas?

Thanks in advance,
Steve

MOS MASTER
08-10-2005, 02:17 PM
Hi And Welcome to VBAX! :hi:

Sharing code in Outlook is a pain in the Ass!

However normally it should work to export the modules and Import in the other Outlook version (With macro security to medium or sign project) and restart outlook to Initialize the events....

But the real way is to write a comaddin. If you write VB then you have the perfect tool to do so. (And convert some of the code back) :rofl:

No really this thread will help you on your way:
http://www.vbaexpress.com/forum/showthread.php?t=3263

It's been to long for me that I've written a com-addin but the links and talk provided should get you on your way.

HTH, :whistle: