Rum macro VBA excel 32 (.86)

Hi everybody,
I want to run Excel macro VBA Name Dynamo in Classeur1.xlsm from Revit with dynamo
My REVIT is 64 bit and my excel a 32 bit
Thank’s
Daniel OLIVES

Please show what you’ve tried :slight_smile:

Re, I try this with short path on my disk C and it is ok but don’t work with long path :slight_smile:Q:\REVIT\03-Bibliothèques WSP\03-3_Biblio-Elec\WSP-R17\03-Docs
Perhaps French “è” ?

And an other question publiTokenKey is for my PC but if I want to ru to another what can I do ?

Daniel OLIVES

import clr
import time
clr.AddReferenceByName(‘Microsoft.Office.Interop.Excel, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71E9BCE111E9429C’)
from Microsoft.Office.Interop import Excel

time.sleep(3)

dirfichier = “C:\TPS\Classeur1.xlsm”
time.sleep(3)
dirmacro = “C:\TPS\Classeur1.xlsm!Dynamo”
time.sleep(3)
ex = Excel.ApplicationClass()
ex.Visible = True
ex.DisplayAlerts = False

wb = ex.Workbooks.Open(dirfichier)
ws = wb.Worksheets[1]
time.sleep(3)
ex.Application.Run (“Dynamo”)
ex.Application.Quit()

OUT = 0