View Single Post
  #2  
Old June 21st 06, 05:33 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Runtime error 424

You can't just copy Word code into Outlook and expect it to work. You must instantiate a Word.Application object with CreateObject() and then derive all the Word objects from that object.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"Graham" wrote in message ...
Hi

I have a macro in word which changes the default path for the save as
dialogue box.

In word it word it works fine but I copied the code into Outlook an I get
the following message

Runtime Error 424
Object required

and the following line is highlighted in yellow when I click debug.

Rem ** This sets the default directory for this word session to the folder
variable **
Options.DefaultFilePath(wdDocumentsPath) = Folder$

Taking the cursor over the Folder$ display the correct path so the code
before seems to be okay

What do I need to do to sort

Thanks for any help
Graham

Ads