rolandkg1001
asked on
How to use wdDialogFileOpen with default path and default name on the top of the dialog
Hi,
I have implemented the function Vorlageoeffnen, which is attached, in a winword 2003 vba.
My problem:
I want to open the dialog window with a default path which should be the path of the winword application itself. My solution does not work for some reason.
Second:
It would be fine, if i could change the name in the top of the dialog from "Öffnen", or "Open" in English to a diffrent name.
Thanks for any help in advance
I have implemented the function Vorlageoeffnen, which is attached, in a winword 2003 vba.
My problem:
I want to open the dialog window with a default path which should be the path of the winword application itself. My solution does not work for some reason.
Second:
It would be fine, if i could change the name in the top of the dialog from "Öffnen", or "Open" in English to a diffrent name.
Thanks for any help in advance
Public Function Vorlageoeffnen()
Dim dialOpen As Dialog
Set dialOpen = Dialogs(wdDialogFileOpen)
With dialOpen
' .Name = Application.ActiveDocument.Path
ChangeFileOpenDirectory (Application.ActiveDocument.Path) & "\"
.Name = "*.xls"
.Display
strExcelDaten = .Name
End With
Set doc = Application.ActiveDocument
If dialOpen.Name <> "*.xls" Then
Ausfuellen
Else
If doc.ProtectionType = wdNoProtection Then doc.Protect wdAllowOnlyFormFields, NoReset:=True
Unload frmWarten
Exit Function
End If
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER