Detaches a document from a cell.
To attach a document to a cell, use AttachDocumentToCell. To get the names and paths of the documents attached to a cell, use GetAttachedDocumentsToCell. |
<HsvData>.DetachDocumentFromCell lScenario, lYear, lPeriod, lEntity, lParent, lValue, lAccount, lICP, lCustom1, lCustom2, lCustom3, lCustom4, bstrDocPath, bstrDocFile
The following subroutine detaches all documents that are attached to a given cell. GetAttachedDocumentsToCell returns the names and paths of the documents to be detached.
Sub detachAllDocsFromCell(lScen As Long, lYear As Long, lPer As Long, _ lEnt As Long, lPar As Long, lVal As Long, lAcct As Long, lIcp As _ Long, lCust1 As Long, lCust2 As Long, lCust3 As Long, lCust4 As Long) Dim vaPaths As Variant, vaFilenames As Variant 'g_cData is a previously set HsvData object reference g_cData.GetAttachedDocumentsToCell lScen, lYear, lPer, lEnt, lPar, _ lVal, lAcct, lIcp, lCust1, lCust2, lCust3, lCust4, vaPaths, vaFilenames For i = LBound(vaPaths) To UBound(vaPaths) g_cData.DetachDocumentFromCell lScen, lYear, lPer, lEnt, lPar, lVal, _ lAcct, lIcp, lCust1, lCust2, lCust3, lCust4, vaPaths(i), _ vaFilenames(i) Next i End Sub