Quote Originally Posted by macropod View Post
And what if there's more than one file whose name is 'logo'? In any event, your code is seriously flawed it will result in multiple images in the primary header where you have linked Sections. Plus, what about documents that have a 'different first page' and/or 'different odd and even' setup?
Thank you for the reply.

Ultimately we would coach our teams to only having one image in the directory. Without getting overly complicated, our team works a new "case" with each customer which means a new directory for each customer. So ultimately the only three files that will exist in their current directory would be

- Excel document that serves as a note taking document
- Word document that populates content based on the information from the excel sheet
- A logo file named logo.(any relevant image extension).

So essentially I want to have code that does something like:

IF logo.png exists in current directory, insert into headers
ELSE IF logo.jpg exists in current directory, insert into headers
ELSE IF logo.gif exists in current directory, insert into headers
ELSE msgbox "No logo files found in current directory"