2

I've developed a userform that adds certain events to a shared calendar amongst my firm. I am looking to install it on two other systems.

I realise the easy way to do this is to simply export the .frm and .frx file and import them on the other machines, however, I am looking for a more intuitive way to do this. For example, if I were to ever change the code on the userform this needs to be replicated on the other machines. This would become tedious very quickly if the other users have to import the new file each time.

I've done this type of thing in Excel before by exporting modules to a temporary .bas file and then re-importing it where necessary.

I have read that the only way to do this in Outlook is through developing a COM addin. Firstly, is that definitely the only way this type of thing is possible? And secondly, if so, how would I go about doing this. I've read a lot of articles but there appears to be a lot of assumed knowledge.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
James Baker
  • 331
  • 3
  • 8
  • 26
  • You could overwrite the [VBA project file](https://stackoverflow.com/questions/233702/where-does-outlook-store-the-vba-code-files). However, that is messy. I suspect bad things will happen if you try this while Outlook is open. An alternative is [Office Developer Tools](https://www.visualstudio.com/vs/features/office-tools/). This is an add-in for Visual Studio that allows you to write add-ins. Outlook doesn't have an equivalent of Excel's [startup folder](https://support.office.com/en-us/article/customize-how-excel-starts-6509b9af-2cc8-4fb6-9ef5-cf5f1d292c19). – David Rushton May 22 '18 at 11:58

1 Answers1

0

I used to do this by referencing the VBIDE, the problem I usually had was with antivirus software and reference paths. When Outlook went to the draconian security model it got harder to do it.

Chip Pearson has some great examples if you wanted to try it, but again I haven't done it in a while.

You'll need to add Microsoft Visual Basic For Applications Extensibility reference to your project from Tools, References.

Programming the VBA Editor

Good Luck.

Charles Byrne
  • 834
  • 2
  • 11
  • 20