for each refdoc

for each refdoc

Anonymous
Not applicable
523 Views
2 Replies
Message 1 of 3

for each refdoc

Anonymous
Not applicable

hi, hoping for a little help...

 

how do i get the current file path of each file in an assembly using ilogic?

 

many thanks for any assistance.

 

Format:HTML Format Version:1.0 StartHTML: 165 EndHTML: 1789 StartFragment: 314 EndFragment: 1757 StartSelection: 314 EndSelection: 314SyntaxEditor Code Snippet

Dim refDocs As DocumentsEnumerator = oInvDoc.AllReferencedDocuments
    Dim refDoc As Document
    
    For Each refDoc In refDocs

???

 

 

0 Likes
Accepted solutions (1)
524 Views
2 Replies
Replies (2)
Message 2 of 3

Owner2229
Advisor
Advisor
Accepted solution

Hi, you can use this below, it'll give you full path and filename of the document (extension included):

 

refDoc.FullFileName

Then you can work with it to get just the path:

 

Dim FName As String = refDoc.FullFileName
Dim FNP As Integer = InStrRev(FName, "\", -1)
Dim oPath As String = Left(FName, FNP)
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
Message 3 of 3

Anonymous
Not applicable

perfect mike, many thanks!!

0 Likes