R
Rita King
Hi,
Using Word2002, I have the following script which works OK. My problem is
that I have used the ChangeFileOpenDirectory command.
I would like the users directory to remain at whatever it was before they
run this macro.
So for instance if the user were to press Ctrl-O and the directory was
Y:\MyFiles then I would like them to be able to run the following macro and
for Y:\MyFiles to remain as the default directory when they press Ctrl-O.
What is the command/procedure for that (please)?
Sub proInputText()
Dim strAns As String
strAns = InputBox("Type the number of the" & Chr(13) & _
"paragraph you wish to insert", "Will Retrieval")
If strAns = "" Then
Exit Sub
Else
ChangeFileOpenDirectory "Y:\Masters\WILLS\"
Selection.InsertFile FileName:=strAns, Range:="", ConfirmConversions:= _
True, Link:=False, Attachment:=False
End If
End Sub
Using Word2002, I have the following script which works OK. My problem is
that I have used the ChangeFileOpenDirectory command.
I would like the users directory to remain at whatever it was before they
run this macro.
So for instance if the user were to press Ctrl-O and the directory was
Y:\MyFiles then I would like them to be able to run the following macro and
for Y:\MyFiles to remain as the default directory when they press Ctrl-O.
What is the command/procedure for that (please)?
Sub proInputText()
Dim strAns As String
strAns = InputBox("Type the number of the" & Chr(13) & _
"paragraph you wish to insert", "Will Retrieval")
If strAns = "" Then
Exit Sub
Else
ChangeFileOpenDirectory "Y:\Masters\WILLS\"
Selection.InsertFile FileName:=strAns, Range:="", ConfirmConversions:= _
True, Link:=False, Attachment:=False
End If
End Sub