Runtime error 424

G

Graham

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
 
S

Sue Mosher [MVP-Outlook]

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

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
M

Michael Bauer

Am Wed, 21 Jun 2006 08:29:37 -0700 schrieb Graham:

Outlook doesn´t know neither the Options object nor a DefaultFilePath
method.
 
G

Graham

Hi

Unfortunately I do not know much about Outlook VBA all I normally do is
create Macros in word the amend some of the code to do what I need.

What is the similar command in Outlook that will allow me to change the
default files path to the one held in the variable Folder$

Regards
Graham
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top