open wordperfect or wordpro with vba from access

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I will like to open wordperfect or wordpro documents by clicking the button
that I currently use to open and display only WORD documents.
 
Just use the folwing code:

strDocName = inputbox("Open what doc?")

application.FollowHyperlink StrDocName


The above will open ANY file. So, if you type in a myfile.pdf, then a pdf
file will be opened. And, this works for any file, Excel, etc. Whatever
program is suppoed to open the doucment will thus open it with the above
example (it will have been if you clicked on the file).
 
Back
Top