Public Function IsProfiledInWorksite(Doc as Word.Document)Dim wordApp as Word.Applicattionset wordApp= Doc.ParentDim ext as Object ' or IManO2k.iManageExtensibility, if relevant library is referencedset ext=wordApp.COMAddins("iManO2k.AddinForWord2000").ObjectIsProfiledInWorksite = (Not (ext.GetDocumentFromPath(Doc.FullName) Is Nothing)set ext=nothingset wordApp=nothingend Function
Public Function IsProfiledInWorksite(Doc As Object) As BooleanDim wordApp As ObjectDim ext As iManO2K.iManageExtensibility ' if relevant library is referencedSet wordApp = Excel.Application ' Doc.ParentSet ext = wordApp.COMAddIns("iManO2k.AddinForExcel2000").objectIsProfiledInWorksite = (Not (ext.GetDocumentFromPath(Doc.FullName) Is Nothing))Set ext = NothingSet wordApp = NothingEnd Function
Public function IsProfiled(byval OfficeDoc As object) As booleanOn Error Goto catch_errIsProfiled = Not (mExt.GetDocumentfromPath(OfficeDoc .FullName) Is Nothing)finally:Exit functioncatch_err:IsProfiled = falseresume finallyEnd function