P
Poodle via OfficeKB.com
Hi there
I have found that the ChangeFileOpenDirectory command in 2003 is unreliable,
although I have only found one post from someone else about this. Anyway, in
order to display the File Open dialog screen at a particular path, I write
the (which I successfully collect from another part of the code) as a string
in a text file. I then collect that path (Folder_Path) and use it in my file
open command as shown below. This all works fine in various places in the
code.
In one place I need to know whether the user pressed Open of Cancel. I
believe I need to display, rather than show, the dialog in order to get the
result.
If I use the following code, it does not open at the correct place:
With Dialogs(wdDialogFileOpen)
.name = Folder_Path & "\"
.Format = wdFormatDocument
End With
Result = Dialogs(wdDialogFileOpen).Display
However, if I use the following code it does work but then I can't get the
result back.
With Dialogs(wdDialogFileOpen)
.name = Folder_Path & "\"
.Format = wdFormatDocument
.Display
End With
Can anyone tell me what I am doing wrong, please? Or if there is another way
to get the result back?
Any & all help greatly appreciated.
Many thanks.
I have found that the ChangeFileOpenDirectory command in 2003 is unreliable,
although I have only found one post from someone else about this. Anyway, in
order to display the File Open dialog screen at a particular path, I write
the (which I successfully collect from another part of the code) as a string
in a text file. I then collect that path (Folder_Path) and use it in my file
open command as shown below. This all works fine in various places in the
code.
In one place I need to know whether the user pressed Open of Cancel. I
believe I need to display, rather than show, the dialog in order to get the
result.
If I use the following code, it does not open at the correct place:
With Dialogs(wdDialogFileOpen)
.name = Folder_Path & "\"
.Format = wdFormatDocument
End With
Result = Dialogs(wdDialogFileOpen).Display
However, if I use the following code it does work but then I can't get the
result back.
With Dialogs(wdDialogFileOpen)
.name = Folder_Path & "\"
.Format = wdFormatDocument
.Display
End With
Can anyone tell me what I am doing wrong, please? Or if there is another way
to get the result back?
Any & all help greatly appreciated.
Many thanks.