user3250900
user3250900

Reputation: 11

OpenFile Dialog MS Access 2010

I followed the suggestion by Cody Gray about halfway down the page in this thread but I'm having no luck.

Unless I'm missing something, this is supposed to allow me to navigate from Access, using the Windows API Dialog Box, to the relevant folder and open a file, no? I'm trying to open a Word doc which has a Mail Merge coming back to the same Access Db. I needed the dialog because there are multiple files that may be selected at different times.

I added all the suggested code and while the process runs without error, when I get to the final step, the selected file doesn't open. Nothing happens.

I realize this is not much help without an error message. Any thoughts nonetheless?

Upvotes: 1

Views: 185

Answers (1)

HansUp
HansUp

Reputation: 97101

As I understand the situation, you have code which uses a string variable named strFileToOpen to hold the path to a Ms Word document. And now you want to open that file in Word.

You can use the FollowHyperlink method.

Application.FollowHyperlink strFileToOpen

Look at the Access help topic for that method. It offers other options you may wish to use.

Also I suggest you look at the help topic for FileDialog Object. It is simpler than the Windows APi method in the code you linked.

Upvotes: 1

Related Questions