A family of Microsoft word processing software products for creating web, email, and print documents.
I had tried that combination. It doesn't fix the problem.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I want to display all of the contents of a designated folder (e.g., "N:\archive\Smith") so that I can select one document to open.
After I assign the desired path (e.g., "N:\archive\Smith" or "N:\archive\Smith\*.*") to TheTempPath, here is my code:
With Application.Dialogs(wdDialogFileOpen)
.Name = TheTempPath
.Show
End With
I have tried all sorts of combinations to TheTempPath, with and without the "/" and the "*.*", and with and without quote marks around the variable, and it always goes straight to default directory. I have also tried .Display instead of .Show and that doesn't work either. I have checked and double checked that TheTempPath is correct (i.e., such a path exists) and it is correct.
I have used Application.Dialogs(wdDialogFileOpen) in other places and it works fine. I am totally lost: why could this be happening?
TIA.
A family of Microsoft word processing software products for creating web, email, and print documents.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
I had tried that combination. It doesn't fix the problem.
It's probably the one combination you didn't try yet: keep the backslash after the last folder name in the path, but no asterisks. In your example, use
TheTempPath = "N:\archive\Smith"
Any other combination will go to the default directory or, after you've manually chosen some other folder, it will go to that last used folder.