Dear folks:

Is it possible to record, or create, a macro that opens a folder only (Word
2003)? I tried to record all the necessary steps but it didn't allow me to
stop recording unless I chose a specific file within the folder. Can anyone
please teach me on this?

Thank you!

RE: record a macro to open a folder, not a file by AnandVVN

AnandVVN
Thu Jul 28 00:02:01 CDT 2005

Hi,

You want to opne the same folder always? You can write a macro the would
display the inbuilt file open dialog box and pass the folder which it has to
open. I assume that you are using the file open dialog box.

Anand

--
"Who will guard the guards?"


"labelladonna" wrote:

> Dear folks:
>
> Is it possible to record, or create, a macro that opens a folder only (Word
> 2003)? I tried to record all the necessary steps but it didn't allow me to
> stop recording unless I chose a specific file within the folder. Can anyone
> please teach me on this?
>
> Thank you!

Re: record a macro to open a folder, not a file by Graham

Graham
Thu Jul 28 00:17:33 CDT 2005

Word cannot open folders, only documents. If you want access to folders add
them to the Places Toolbar
http://www.gmayor.com/customize_the_word_places_bar.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

labelladonna wrote:
> Dear folks:
>
> Is it possible to record, or create, a macro that opens a folder only
> (Word 2003)? I tried to record all the necessary steps but it didn't
> allow me to stop recording unless I chose a specific file within the
> folder. Can anyone please teach me on this?
>
> Thank you!



Re: record a macro to open a folder, not a file by Michael

Michael
Thu Jul 28 08:40:59 CDT 2005

On Wed, 27 Jul 2005 19:34:01 -0700, labelladonna
<labelladonna@discussions.microsoft.com> wrote in
microsoft.public.word.vba.general:

>Dear folks:
>
>Is it possible to record, or create, a macro that opens a folder only (Word
>2003)? I tried to record all the necessary steps but it didn't allow me to
>stop recording unless I chose a specific file within the folder. Can anyone
>please teach me on this?

In VBA Help, look for "FileDialog Object". Example:

Dim objFD As FileDialog

Set objFD = Application.FileDialog(msoFileDialogFolderPicker)
If objFD.Show Then
Debug.Print objFD.SelectedItems(1)
Else
Debug.Print "Nothing selected."
End If

--
Michael Bednarek http://mbednarek.com/ "POST NO BILLS"