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

This did work, Thanks!

Still wasn't able to get the auto-fit to work for some reason but that is super minor.

If anyone is looking for the expanded ilogic here is how to give it a file name and a location.

 

SyntaxEditor Code Snippet

Try
'oPath = set Export Path location
    oPath = "C:\_CADD"

'Set Values
    'Defines filename. Is directly linked to Part Number for Drawing.Sets other data values.
    oTableNumber = iProperties.Value("Project", "Part Number")
    oFileName = ThisDoc.FileName(False) 'without extension
    oDocument = ThisApplication.ActiveDocument
    oDataMedium = ThisApplication.TransientObjects.CreateDataMedium
    oRevTable = oDocument.ActiveSheet.RevisionTables.Item(1)
    oOptions = ThisApplication.TransientObjects.CreateNameValueMap
'get target folder path
    oFolder = oPath & "\" & "For_Import"
'Check for the Target folder. If it exists, do nothing. If it does not exist, create it.
If Not System.IO.Directory.Exists(oFolder) Then
    System.IO.Directory.CreateDirectory(oFolder)
End If

'Set the target file name
oDataMedium.FileName = oFolder & "\" & oTableNumber & "-TempRevTable" & ".xlsx"
oExportName = oDataMedium.FileName

'Export Rev Table document
oOptions.Value("AutoFitColumnsWidth") = 1
oRevTable.Export(oExportName, kMicrosoftExcelFormat,oOptions)

Beep()
i = MessageBox.Show("Revison Table successfully exported!", "Revison Table Export", MessageBoxButtons.OK, MessageBoxIcon.Asterisk, MessageBoxDefaultButton.Button1)
Catch
MessageBox.Show("No Revison Table Found.", "iLogic - Warning")
End Try