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

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Forum statistics

Threads
1,216,099
Messages
6,128,822
Members
449,469
Latest member
Kingwi11y

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