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)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.