I have the following code is a test document (.doc) and it opens the dialog
box fine for me to select an image folder.

'
' select the folder
'
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
If .Show Then
myFolder = .SelectedItems(1)
End If
MsgBox ("Folder selected is " & myFolder)
End With

However, when I place that same code in a Word template (.dot) I see the
MessageBox displayed but the dialog box never appeared prior to that for me
to select the folder.

What am I missing? I am trying this in Word 2002 (XP) on WinXP SP2.

Mainer

Re: Dialog not opening for selection by Doug

Doug
Mon Jul 14 22:18:29 PDT 2008

Works fine in a template here.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Mainer" <Mainer@discussions.microsoft.com> wrote in message
news:6B2E35E4-7E7A-4B57-8E69-E53CA6447903@microsoft.com...
>I have the following code is a test document (.doc) and it opens the dialog
> box fine for me to select an image folder.
>
> '
> ' select the folder
> '
> With Application.FileDialog(msoFileDialogFolderPicker)
> .AllowMultiSelect = False
> If .Show Then
> myFolder = .SelectedItems(1)
> End If
> MsgBox ("Folder selected is " & myFolder)
> End With
>
> However, when I place that same code in a Word template (.dot) I see the
> MessageBox displayed but the dialog box never appeared prior to that for
> me
> to select the folder.
>
> What am I missing? I am trying this in Word 2002 (XP) on WinXP SP2.
>
> Mainer