Copy OutLook Project1(VbaProject.OTM) so it can be shared with other users.

Is there a way to copy an OutLook vba project out to share with others?  In the VBA-Editor in OutLook, I have a Project1(VbaProject.OTM)  it have a few userforms, modules etc packed into it.  How do I save this out, to share with someone?  I see that I can export each item, one at a time, but wondering if there is a way to capture them all at once and import/share them all at the same time?
Please advise and thanks.
Who is Participating?
Roy CoxGroup Finance ManagerCommented:
This is written for Excel but applies to most Office programs

Import or Export your VBA code.

After creating a UserForm or Macro for one Excel application, you may decide that you want to use it again, maybe with a few modifications, in another project. You do not need to recreate the UserForm or Macro from scratch, simply export the code to a file that you can import when required for a new application.

Export your VBA code:

Open the workbook that contains the code you want to export.
Press Alt + F11 to open the VB Editor.
Right-click UserForm or Macro in the Project Explorer.
Select Export File.
Navigate to the folder where you want to save your form.
Change the file name if you want and click Save.

Import your VBA code:

Open the workbook that contains the code for your new application.
Press Alt + F11 to open the VB Editor.
Right-click the project name in the VBA Project window.
Select Import File.
Navigate to the file you want to import.
Click Open.
You can use the above steps to export or import any Excel VBA Project object.

Drag and Drop VBA code from one Workbook to another

Many Excel users are unaware that you can copy all the code in a module by doing the following:

Open both workbooks.
Hold the Alt key, and press the F11 key, to open the Visual Basic Editor.
In the Project Explorer, find your workbook, and the workbook with the code that you want to copy.
In the workbook containing the code, click the + sign to view the list of Modules. Click on the module that you want to copy, and drag it to the project where you'd like the copy placed. Release the mouse button, and a copy of the module will appear in the destination workbook.

The same method can also be used with UserForms.
Roy CoxGroup Finance ManagerCommented:
This article might help
Roy CoxGroup Finance ManagerCommented:
Seems like other MS Office programs you can Import/Export the code by right clicking on the project or macro and choosing Export File
RWayneHAuthor Commented:
thanks, this helped..
Roy CoxGroup Finance ManagerCommented:
Pleased to help
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.