The code works on my machine so let's step through possible problems.
1. CreateObject 'could' be a problem if Outlook was already open. So you might tell vba to ignore errors and try getobject first and if no object is created, then use createobject
2. You can add DoEvents after opening the app to give it time to load before proceeding with the next steps
3. If you are using late binding to create the application then don't use variables that are only available when a reference is set to that application. olMailItem and olImportanceNormal should be replaced by their integer value.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
|