Subscribe Bookmark RSS Feed

Is it possible to launch MS Word or Excel from JMP?

Hi - I've written a JMP script that writes and saves an XML file which can be subsequently imported into MS Word and converted into a Word document.  Checking that I've got the XML syntax right means that I'm continually having to open the newly-created XML file in Word as soon as it's been created - so instead I'd like to launch Word and import that file into it from my script.  Can that be done?  If so, how?  (I'm running JMP in Windows.)

Many thanks

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Just Open the file.  Here's how I do it:

save text file(xml_file_path,

                (xml_header || xml_summary_worksheet || xml_pt_worksheet ||

                xml_hlt_worksheet || xml_soc_worksheet || xml_dme_worksheet ||

                xml_mc_worksheet || xml_footer));

// Make sure the file is completely closed

wait(.5);

// Offer to open this Excel file now

open_now = 0;

open_dlg = new window("Open Excel File Dialog",

    << modal,

    vlistbox(

        textbox("Do you want to open this Excel Workbook now?"),

        hlistbox(

            buttonbox("Yes",

                open_now = 1),

            buttonbox("No")

        )

    )

);

if (open_now,

// then

    open(xml_file_path);

);

2 REPLIES
Solution

Just Open the file.  Here's how I do it:

save text file(xml_file_path,

                (xml_header || xml_summary_worksheet || xml_pt_worksheet ||

                xml_hlt_worksheet || xml_soc_worksheet || xml_dme_worksheet ||

                xml_mc_worksheet || xml_footer));

// Make sure the file is completely closed

wait(.5);

// Offer to open this Excel file now

open_now = 0;

open_dlg = new window("Open Excel File Dialog",

    << modal,

    vlistbox(

        textbox("Do you want to open this Excel Workbook now?"),

        hlistbox(

            buttonbox("Yes",

                open_now = 1),

            buttonbox("No")

        )

    )

);

if (open_now,

// then

    open(xml_file_path);

);

Just what I needed to put the icing on the cake - many thanks!