Delete a Module in Outlook Project

前端 未结 2 508
慢半拍i
慢半拍i 2021-01-26 09:41

Can I delete an Outlook VBA Module?

I have tried the below code:

Dim vbMod As Object

Set vbMod = Application.VBE.ActiveVBProject.VBComponents
vbMod.Rem         


        
2条回答
  •  迷失自我
    2021-01-26 10:18

    The answer to your answer is no, we can't delete or even access programmatically the VBIDE; it is correct that you can add reference to Microsoft Visual Basic for Applications Extensibility 5.3, but to no avail.

    If you try this at Word or Excel, this is the output:

    But, when you try this at Outlook, VBE is not exposed:

    Here is a confirmation. Maybe in older Outlook versions, less safer, you could do that, but at least since Outlook 2002, it is not possible.

提交回复
热议问题