Hi,
I am trying to open a browse window in Word. I think the code should be something like:
Function BrowseFolder() As String
'This opens a browse window and collects path as return value
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
If .Show Then
BrowseFolder = .SelectedItems(1) & "\"
End If
End With
End Function
When I run the code I get a compile error on .FileDialog
'Method or Data Member not found.' I thought this meant a reference was not included but I have Microsoft Word 9.0 Object Library & Microsoft Office 9.0 Object Library already included - Am I wrong about the references or am I leaving something out?
Thanks
Crabback
I am trying to open a browse window in Word. I think the code should be something like:
Function BrowseFolder() As String
'This opens a browse window and collects path as return value
With Application.FileDialog(msoFileDialogFolderPicker)
.AllowMultiSelect = False
If .Show Then
BrowseFolder = .SelectedItems(1) & "\"
End If
End With
End Function
When I run the code I get a compile error on .FileDialog
'Method or Data Member not found.' I thought this meant a reference was not included but I have Microsoft Word 9.0 Object Library & Microsoft Office 9.0 Object Library already included - Am I wrong about the references or am I leaving something out?
Thanks
Crabback