Re: ChangeFileOpenDirectory
- From: Russ <drsN0SPAMmikle@xxxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 21 Nov 2007 16:54:59 -0500
Hey Ed,
Helmut's suggestion seems sufficient.
However, I'm curious.
If you put the line:
MsgBox "<<" & newpath & ">>"
Just before the ChangeFileOpenDirectory line in the recalcitrant computer,
does that message popup show the path string you expect between the chevrons
and/or is that enough time to allow the path to resolve itself before the
FileOpen dialog appears?
Hi Ed,
this one is working for me today,
but who knows about tomorrow?
Sub OpenFolder()
Dim f1 As String
Dim f2 As String
Dim f3 As String
f1 = "c:\test\word1\"
f2 = "c:\test\word2\"
f3 = "c:\test\word3\"
ChangeFileOpenDirectory f3
With Dialogs(wdDialogFileOpen)
.Name = f3 & "*.doc" ' ! Path & name
.Show
End With
End Sub
--
Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
Vista Small Business, Office XP
I have installations of the identical VBA program on 20 different computers.
I use the following command with some frequency.
ChangeFileOpenDirectory newpath
With Dialogs(wdDialogFileOpen)
.name = "*.doc"
CloseNum = .Show
End With
The command works perfectly on 19. One the 20th it refuses to work. The
MyDocuments folder consistently opens when the section of code is
encountered.
I have doubled the "ChangeFileOpenDirectory newpath" command (I found that
suggestion on a board) but that doesn't work either.
When I step through (debugging) the vba code it works fine, so I know that
the connections are intact.
Any thoughts?
Ed (in Virginia)
--
Russ
drsmN0SPAMikleAThotmailD0Tcom.INVALID
.
- Follow-Ups:
- Re: ChangeFileOpenDirectory
- From: Ed
- Re: ChangeFileOpenDirectory
- References:
- ChangeFileOpenDirectory
- From: Ed
- Re: ChangeFileOpenDirectory
- From: Helmut Weber
- ChangeFileOpenDirectory
- Prev by Date: Re: Delete single newline between tables
- Next by Date: Dialog Index 98
- Previous by thread: Re: ChangeFileOpenDirectory
- Next by thread: Re: ChangeFileOpenDirectory
- Index(es):
Relevant Pages
|
Loading