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

2021-06-15T13:57:33.407+00:00

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,175 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.