Hi,
I have one General Table in a Drawing that is referenced to an Excel file. But I want to change the reference from 11.xlsx to another file named 12.xlsx
For now I have this code that I saw in some forums
DimexcelFileNameAsString=ThisDoc.Path
DimtitleAsString
excelFileName=excelFileName&"\11.xlsx"
title="ASME"
DimdocasDocument=ThisDoc.Document
ForEachdSheetAsSheetIndoc.Sheets
ForEachtableAsCustomTableIndSheet.CustomTablesIf(table.TableSource<>TableSourceTypeEnum.kExcelTableSource)ThenContinueFor
DimfileDescAsFileDescriptor=TryCast(table.ReferencedDocumentDescriptor, FileDescriptor)
If(fileDescIsNothing)ThenContinueFor
fileDesc.ReplaceReference(excelFileName)
table.Title=title
Next
Next
but it is always giving me an error: "
Unspecified error (Exception from HRESULT: 0x80004005 (E_FAIL))"
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
--
F.Goncalves