09-28-2016
12:40 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
09-28-2016
12:40 AM
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"
please feel free to "kudos"