milesUK
Active Member
- Joined
- Jan 5, 2003
- Messages
- 388
In MS Outlook 2000 I have created a VBA macro (partially gleaned from the net) to create a new Outlook mail item and attach Excel files before sending. All works fine so far but I now need to change it to identify ALL of the files in a single folder and attach them to the mail item.
I have used
but this errors (@ the .FileSearch line) with Object does not support this property or method. As does
I know that this is closer to File-->Open than Insert-->File but can anyone shed any light on this isssue please. All that I require is a means, within Outlook 2000, of getting the filenames of files within a folder. I would prefer to leave this as an Outlook macro as it is being created for someone else to use who does not (edited!) normally use Excel.[/i]
I have used
Code:
Dim fsoFileSearch As FileSearch
Set fsoFileSearch = Application.FileSearch
Code:
Dim outApp As Application 'As Outlook.Application
Set outApp = New Outlook.Application
With outApp.FileSearch