Page 1 of 1

Toolbar Button To Launch MS Word With A Specified Doc Open

Posted: Mon Jun 27, 2011 2:44 am
by pcgeek
I have been able to add a button to launch Word, but I get an error when I try to specify a document to open.

Please tell me how to do this.

Thanx,

Randy

Posted: Mon Jun 27, 2011 6:40 pm
by Instructor

Code: Select all

"Open Word document" Exec(`"c:\Program Files\Microsoft Office\Office10\WINWORD.EXE" "c:\File.doc"`) Icon(0)
or

Code: Select all

"Open Word document" Exec(`rundll32.exe shell32,ShellExec_RunDLL "c:\File.doc"`) Icon(0)

Toolbar Button To Launch MS Word With A Specified Doc Open

Posted: Tue Jun 28, 2011 4:01 pm
by pcgeek
Thanx much,

That did it. I had it all right except for the single quotes around everything inside the (). Didn't know about those. Is that type of thing documented anywhere?

BTW, I can't get the help files to work. Every time I try to open them I get the following error:

"Navigation To The Web Page Was Cancelled".

Any idea why?

Also, the following works if you put the Word doc in the AkelPad directory:

# User's Manual
"User's Manual" Exec(`rundll32.exe shell32,ShellExec_RunDLL "%a\AkelPad4-User'sManual.docx"`) Icon("Word.ico")


Thanx,

Randy
[/img]