How to create link to Outlook with to and subject fields prefilled? - outlook

Is there a way to link to Outlook opening a new compose window with the to and subject fields pre-filled?
Below does not work:
https://outlook.live.com/mail/compose?subject=bla

You could probably try this. It opens compose correctly for me on browser.
https://outlook.live.com/mail/0/deeplink/compose?to=test#gmail.com&subject=test&body=testing

Outklook.com? No. Outlook the Windows client? Sure: mailto:user#example.com?subject=test%20subject
To open desktop Outlook, run the following from command line. I don't think you can specify subject or body, only the email:
outlook.exe /c ipm.note /m test#domain.demo

Related

Outlook cmd select folder from non default email account

Let's say I've xxx#outlook.com and yyy#outlook.com both are configured in my outlook where xxx#outlook.com is my default account.
The following command opens a new window in outlook and navigates to the zz folder in Drafts in xxx#outlook.com.
Outlook.exe /select outlook:Drafts/zz
I wonder is there a way to perform this same operation on the yyy#outlook.com (Anything other than the default account). I tried the following but it didn't help.
Outlook.exe /select outlook:yyy#outlook.com:Drafts/zz
I want to select a folder from a non default account through command line. Any ideas?
I just found an answer. Its so simple. I don't know how I missed this.
Outlook.exe /select "outlook:\\yyy#outlook.com\Drafts\zz"
It may be helpful for others.

Open .eml files in compose mode in outlook 2010

I want my users to be able to open eml files in compose mode in outlook 2010, by default it opens in readonly mode. Is there any way out?
Use: We generate email templates which the users can download and customize it before sending.
If you can add the header "X-Unsent: 1" to your .eml, it should open in Compose mode.
Works on Microsoft Outlook but does not work on thunderbird.
A related discussion can be found here https://bugzilla.mozilla.org/show_bug.cgi?id=688284
Mail on MacOS adds this header internally:
X-Uniform-Type-Identifier: com.apple.mail-draft
Unfortunately, this will still not allow you to sent it directly. However, you can move any mail to your drafts folder and then sent it from there.

How to handle drag-and-drop to a Win32 application icon?

I have to update a Win32 application in order to handle the drag-and-drop of files over the icon of the executable.
I am not sure about how to proceed. A few researches led me to considering the "WM_DROPFILES" message, but MSDN syas it is "Sent when the user drops a file on the window", while I don't want to open a window.
Think of a command line tool "MyProgram.exe" : if I drag "MyFile.file" on the windows icon "MyProgram" in the desktop, I would like it to execute the same way as it would do when typing ">MyProgram MyFile.file" in the command prompt.
Any idea how to achieve this result ?
While it is true that apps get this for free by parsing the command line, there is a shell interface called IDropTarget you can implement if you need more control. See MSDN and this blog entry for more details.
Windows does this for you automatically. Any program foo.exe accepts drags of any file.
Martyn

How to launch an application from a browser?

Is it possible to launch an application from a browser? I am not talking about opening a file from a browser (like open a PDF with Adobe Reader), but rather opening a new (blank) instance of an application that is installed on the user's machine.
Hypothetical situation: User browses a website that lists computers that can be managed via RDP. He clicks on a link to 192.168.1.10, that link opens Microsoft RDP client (mstsc.exe) with that ip address already filled out.
I am talking strictly about Windows universe.
Is that thing even doable outside of ActiveX and IE?
Is it wise to attempt this in IE with ActiveX?
The correct method is to register your custom URL Protocol in windows registry as follows:
[HKEY_CLASSES_ROOT\customurl]
#="Description here"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\customurl\shell]
[HKEY_CLASSES_ROOT\customurl\shell\open]
[HKEY_CLASSES_ROOT\customurl\shell\open\command]
#="\"C:\\Path To Your EXE\\ExeName.exe\" \"%1\""
Once the above keys and values are added, from the web page, just call "customurl:\\parameter1=xxx&parameter2=xxx" . You will receive the entire url as the argument in exe, which you need to process inside your exe. Change 'customurl' with the text of your choice.
You can't really "launch an application" in the true sense. You can as you indicated ask the user to open a document (ie a PDF) and windows will attempt to use the default app for that file type. Many applications have a way to do this.
For example you can save RDP connections as a .rdp file. Putting a link on your site to something like this should allow the user to launch right into an RDP session:
Server 1
#AbhijithCR 's reply works well. To register the protocol via a .bat file, do something like this
set key=customurl
reg add HKCR\%key% /ve /d "URL:Description"
reg add HKCR\%key% /v "URL Protocol" /d ""
reg add HKCR\%key%\shell
reg add HKCR\%key%\shell\open
reg add HKCR\%key%\shell\open\command /ve /d ""c:\path to\your.exe" ""%%1"""
For me getting all the quotes and the double percent signs right was the tricky part.
Some applications launches themselves by protocols. like itunes with "itms://" links. I don't know however how you can register that with windows.
We use a sonicwall vpn. It launches a java applet that launches mstc with all the credentials setup. You really can't do this without a java applet or activex plugin.
Microsoft uses this technique itself on their small business server for getting inside the network. I wouldn't say it is a terrible idea, as long as platform independence isn't important.
You can use SilverLight to launch an application from the browser (this will work only on IE and Firefox, newer versions of chrome don't support this)
Example code here
I achieved the same thing using a local web server and PHP. I used a script containing shell_exec to launch an application locally.
Alternatively, you could do something like this:
Notepad

What does the registry value for the outlook(2003) msgfile extension stand for?

If you want to open an msg Email file with the extension .msg, Outlook 2003 will be started with some parameters. Therefore you can find the following registry keys:
HKEY_CLASSES_ROOT\msgfile\shell\Open\command\(standard)
HKEY_CLASSES_ROOT\msgfile\shell\Open\command\command
The first one points to the "outlook.exe" with the parameter /f "%1". This starts Outlook with the information to open the mail.
But the "command" key has the following value:
%]gAVn-}f(ZXfeAR6.jiOUTLOOKFiles>ir#X7cr$%#u$}&V7{4p' /f "%1"
Can anybody tell me what exactly this is good for?
I'm writing an vsto Outlook Addin for which I need to modify these keys. In case I modify the "standard" key, Outlook will be started normaly without using my alteration of the key. If I also modify the "command" key Outlook does not even start anymore.
Only if I delete the "command" key everything works fine as expected. But without knowing what the key is good for, this cannot be a solution.
this "command" value is a so-called "Darwin Descriptor" generated by Windows Installer to automatically repair a broken installation.
See http://www.symantec.com/community/tip/4999/darwin-descriptor or google for "MSI darwin descriptor".

Resources