Announcements
Attention for Customers without Multi-Factor Authentication or Single Sign-On - OTP Verification rolls out April 2025. Read all about it here.

Hi,

 

I've noticed that the drawingdocument should be saved first, otherwise it cannot create a file and then you get the error.

You could workaround by saving the excel in your workspace.

The other problem is that the xls extension should be xlsx

Then it works perfect

Dim oDrawDoc As DrawingDocument
oDrawDoc = ThisApplication.ActiveDocument

Dim oOptions As NameValueMap 'see below for additional options
oOptions = ThisApplication.TransientObjects.CreateNameValueMap
oOptions.Value("AutoFitColumnsWidth") = 1

Dim oRevTable As RevisionTable
oRevTable = oDrawDoc.ActiveSheet.RevisionTables.Item(1)

oRevTable.Export(ThisDoc.PathAndFileName(False) & ".xlsx", kMicrosoftExcelFormat)

 

If you think this answer fullfilled your needs, improved your knowledge or leads to a solution,
please feel free to "kudos"