web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics SL (Archived)

Launch Outlook without full path in launch command

(0) ShareShare
ReportReport
Posted on by 962

Does anyone know how to launch Outlook from a custom button on a screen in SL2015 without using the full path?

It works if you use the full path.  However, some users may have a different version of Outlook and thus the path will be different.

serr1 = Launch("C:\Program Files (x86)\Microsoft Office\root\Office16\Outlook.exe /c ipm.note", False, False, 0)

I would like to use 
serr1 = Launch("Outlook.exe /c ipm.note", False, False, 0)

However, that fails. 

I can use the Start - Run command and type Outlook.exe /c ipm.note and it works fine without the full path.  

In the end, I want to do something like this:

outlook.exe /c ipm.note /m "steve@gmail.com&subject=sample subject&body=sample body" /a "C:\sample.pdf"

This works great from the Run windows.  What am I missing?  Any direction is appreciated. 

Thank you in advance.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Erich Strelow F Profile Picture
    16 on at

    You guessed it right, the "Start - Run" is aware of additional paths. Check out https://msdn.microsoft.com/en-us/library/ee872121(v=vs.85).aspx#appPaths 

    Sl probably goes back to the original ShellExecute() call, which only search for a file.

    You should be able to use the "start" command as a cheap replacement. Try the following:

    serr1 = Launch("cmd.exe /c start Outlook.exe /c ipm.note", False, False, 0)
    serr1 = Launch("cmd.exe /c start mailto:steve.wier@contoso.com", False, False, 0)
    I haven't tried this myself, though.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics SL (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans