Hi all,
I have a really weird bug with Word VBA API access.
In short, in certain Word document and template files I am finding that the VBA IDE does not recognize the Folder type, and code that accesses that type does not run.
Thus, when I type something like:
Dim fldr as ...
The drop down list of types that appears does not include Folder (and also not Folders).
Longer version: I had developed some code in a Word 2003 DOT file to use as an add-in. The code involved processing folders. Once I had verified that the code correctly worked, I then decided to merge all the code and its forms into an existing template. Only then I discovered that some of the code was not recognized as VBA in the 'new' template file. The VBA interpreter flagged that the 'Folder' type was not recognized. Weird… Then I checked if the same thing occurred in Word 2007. Yes, it does. Then I checked if the same thing occurred also in other docs and template files. Yes it does - and even in the Normal template. So now it looks like that is the norm and that I was just 'lucky' that until now, in the template I had been using to develop the code, I could access the Folder type.
I suppose a work-around would be that I could just declare as variants all the objects that I need as 'Folder' type. But I didn’t try this yet.
Anybody encountered something like this, that part of VBA is not accessible?
TIA
-avraham



