Launch application from Outlook message

C

Chris Mahoney

Hi

I'm trying to send messages to users (from Access VBA), with a link to
an application on their systems. Currently I'm sending the following:

Please click <a href="C:\WINDOWS\system32\wscript.exe
N:\Library2000\LaunchPhotos.js CN0519 2409">here</a> to open the form.

As you can see, there are a few command-line parameters, and this is
where I'm running into difficulty. <a
href="C:\WINDOWS\system32\wscript.exe"> works perfectly (Windows Script
Host opens when the user clicks the link) but once I add parameters,
Outlook gets confused:

Cannot find file 'C:\WINDOWS\system32\wscript.exe
N:\Library2000\LaunchPhotos.js CN0519 2409'. Make sure the path or
Internet address is correct.

It seems that Outlook isn't recognising the space separator, and is
actually looking for a file called "C:\WINDOWS\system32\wscript.exe
N:\Library2000\LaunchPhotos.js CN0519 2409" which of course doesn't
exist.

Any suggestions?
Thanks
Chris
 
C

Chris Mahoney

I just added a <script> tag to the HTML header, and copied in the
contents of LaunchPhotos.js. The script is now attempting to run, and
although it's not working properly I am definitely getting somewhere :)

Here's the script:

function launchInfoPath()
{
objInfoPath = new ActiveXObject("InfoPath.Application");
strXSFPath =
"D:\\VBProjects\\LibraryPhotos\\LibraryPhotos\\manifest.xsf";
objInfoPath.XDocuments.NewFromSolution(strXSFPath);
}

Of course, this isn't an InfoPath or scripting newsgroup, but do you
see any reason why that wouldn't work? It opens IE for a split-second
then closes, and InfoPath doesn't open at all.

Thanks
Chris
 

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