GOGGS75
01-05-2011, 12:06 PM
Hi,
I have created a macro on WORD that requires the user to select a folder. Using the 'Application.FileDialog' option I have been able to set this up on WORD 2007 but there is a slight problem on WORD 2003.
The commands I have used to select a folder are as follows:
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = "C:\Users\Goggs\Documents\Word Documents\AEGON\"
.Title = "Select the folder to save individual invoices to"
.AllowMultiSelect = False
.Show
If .SelectedItems.Count = 0 Then
OUTCOME = "NOEXTRACT": GoTo FINALMSG
Else
EXTRACT = .SelectedItems(1)
End If
End With
The slight problem is that WORD 2003 treats a folder as being selected whenever the enter key is pressed. This leaves the mouse the only way of changing drive or moving back one folder. As wanted WORD 2007 only treats a folder as being selected when the OPEN button is clicked with the mouse
Does anyone know of a way around this problem.
Thanks for any advice
Goggs75
I have created a macro on WORD that requires the user to select a folder. Using the 'Application.FileDialog' option I have been able to set this up on WORD 2007 but there is a slight problem on WORD 2003.
The commands I have used to select a folder are as follows:
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = "C:\Users\Goggs\Documents\Word Documents\AEGON\"
.Title = "Select the folder to save individual invoices to"
.AllowMultiSelect = False
.Show
If .SelectedItems.Count = 0 Then
OUTCOME = "NOEXTRACT": GoTo FINALMSG
Else
EXTRACT = .SelectedItems(1)
End If
End With
The slight problem is that WORD 2003 treats a folder as being selected whenever the enter key is pressed. This leaves the mouse the only way of changing drive or moving back one folder. As wanted WORD 2007 only treats a folder as being selected when the OPEN button is clicked with the mouse
Does anyone know of a way around this problem.
Thanks for any advice
Goggs75