Using VB6 to search for existence of DataFile in Outlook
- by Graeme
Hi,
I am wanting to write an Add-In for Outlook 2003 which, when Outlook is opened, search for the existence of a datafile called DMSDataStore and if it doesn't exist will install the datafile. I have managed to create the Add-In using VB6 and it runs when I open Outlook. However I haven't found the best/easiest way to search for the existence of the datafile. If the datafile exists it is visible within Outlook under the user's mailbox, much the same as an archive folder is. I would like to be able to search for it by name which is DMSDataFile.
I did try - Set tmpInbox = parentFolder.Folders("DMSDataFile")
This works OK if the datafile exists but will throw an error if it doesn't. I can create an error handler which will then install the datafile but this doesn't seem like a very tidy way of doing things.
I guess I might have to recursively search for the datafile.
Can someone let me know what is the best / easiest way to search for the datafile using the name of the datafile and give me some code with which to do it.
Thanks
G