Hello,

I am trying to write a simple macro that will check for any files with the term 'logo' in it, but this code doesn't seem to be working. There is a logo.jpg file in the current directory. Any ideas?

Sub Logocheck()

Dim ImgName As String
Dim ImgPath As String
ImgPath = ThisDocument.Path
ImgName = Dir(ImgPath & "logo.*")
MsgBox ImgName


End Sub
The actual application of this is will be to insert any image file with the name 'logo' in it, into the header of the word document.

This is only posted on this forum.