Share via

How to create a vbs file that can import a particular macro (bas file) into outlook

Jun 15, 2021, 1:57 PM

Hello All,
Can you please Help.
I would like to have a .vbs file which when executed automatically imports a .bas file (stored in my desktop) and updates the outlook modules with the latest macros.
I searched online, there are codes that is working in excel, apparently not in Outlook.

"Set oApp = CreateObject("Outlook.Application")
oApp.VBE.ActiveVBProject.VBComponents.import "C:\Users\JAS3BMH\Desktop\Module1.bas""

the above code doesn't work

Many thanks in advance,

Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
5,819 questions
Office Visual Basic for Applications
Office Visual Basic for Applications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Visual Basic for Applications: An implementation of Visual Basic that is built into Microsoft products.
1,502 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.