Message 1 of 2
Run an Inventor macro from Outlook

Not applicable
05-30-2016
02:06 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi
I am trying to run an Inventor macro from Outlook, I have this code but it doesn´t work
Could anybody please help me with that ?
Sub Inventor()
Dim InventorApp As Object
On Error Resume Next
Set InventorApp = GetObject(, "Inventor.Application")
On Error GoTo 0
If InventorApp Is Nothing Then
Set InventorApp = CreateObject("Inventor.Application")
End If
InventorApp.Visible = True
InventorApp.VBAProjects.Visible = True
InventorApp.VBAProjects.Open "route of the macro"
InventorApp.Run "OpenVBAProjects"
End Sub
Thanks