问题
I'm trying to open Microsoft Outlook 2010 from cmd, but I'd like the body of the email to contain line breaks/newlines.
"C:\Programs\Microsoft Office\Office14\OUTLOOK.EXE" /c ipm.note /m "myemail@email.com&cc=seconda.address@email.com&subject=Test&body=Line 1 \r\n Line 2"
With that outlook 2010 opens correctly with email addresses, the subject but i can't figure out how to automatically insert a newline.
I've tried with /0,
,
, , \r\n, \r\r, $_ but it still write it as simple text.
I know that %20 character puts is a whitespace, but i need a newline.
Is that even possible? No .bat or stuff, just plain command line (windows XP)
回答1:
Try this:
"C:\Programs\Microsoft Office\Office14\OUTLOOK.EXE" /c ipm.note /m "myemail@email.com&cc=seconda.address@email.com&subject=Test&body=Line 1 %0D%0ALine 2"
Replace the \r\n
with %0D%0A
you can also remove the space on the next line by removing space after adding %0D%0A
so something like this %0D%0A
Line 2
Below is a link to read up and understand it better. It might come in handy for other possible questions you might have in future
WIKIPEDIA
来源:https://stackoverflow.com/questions/20218018/open-outlook-exe-from-cmd-with-body-text-containing-newlines