Iterating over a nested tree that has no index

romanemul

New Member
Joined
Jul 22, 2016
Messages
35
Hi

I have imported a reference library to play with in VBA.

Library is called IMAPI and its used for burning CDs, DVDs etc.... It contain two references IMAPI and IMAPI2FS
the IMAPI2FS is a filesystem reference. where you can manipulate with filesystem choosing which files to burn.

Methods for adding directories into filesystem to burn is called obviously addirectory(), addtree() ... resulting in new particular object type with all the files and directories.

However those methods use string to locate items and not an index (Item(path As String)) therefore i cannot (or i dont know how) loop through that collection of items. So i cannot use for loop .

i tried use for each specifing the type but it only do the root items ignoring subitems.

I can make wrapper using VBS scripting but thats not efficient for me.

Is there a way how to iterate over such collection ?

Thanks in advance



Rom
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.

Forum statistics

Threads
1,224,823
Messages
6,181,175
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top