Run an Inventor macro from Outlook

Run an Inventor macro from Outlook

Anonymous
Not applicable
455 Views
1 Reply
Message 1 of 2

Run an Inventor macro from Outlook

Anonymous
Not applicable

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 

0 Likes
456 Views
1 Reply
Reply (1)
Message 2 of 2

arrakisman
Enthusiast
Enthusiast

I don't think .Visible is a valid method/property for VBAProjects.

 

Capture.JPG

0 Likes