How to Open MS Word Application using a Infopath Form Button

S

Sam

Hi All,

I am looking for a jscript, which I can place in a Infopath Form button
to call a Microsoft Word document. Does anyone have an example using jscript
to execute the following command line when a user hits a 'Open MS Word'
button....Thanks!

c:\Program Files\Microsoft Office\Office12\winword.exe
C:\File.docx
 
C

Chandrakanth (GGK Tech)

Hi,

Please write the below code in button event in the JScript for opening the
word document when user hits on the button.

// Open the temporary file in Word
var wordApp = new ActiveXObject("Word.Application");
wordApp.Documents.Open("C:\\File.docx");
wordApp.Visible = true;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top