Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Scripted text from Acrobat and Microsoft Outlook emails

Engaged ,
Jan 22, 2017 Jan 22, 2017

I have scripted "canned" emails that employ rich text formatting, such as line returns and tabs using \r and \t. Using a mouse up action with a button and the app.mailMsg method, the script opens my default email client, Mail.app, and generates the email, ready to send to the addressee. The addressee and contents of the email are determined by values entered in other fields that are referenced within my script as variables.

I also want this script to work with Microsoft Outlook, but Outlook seems to only offer HTML and plain text. The rich text formatting is ignored by Outlook.

So my question is this: can I amend my script to place line breaks, returns and tabs into either plain text or HTML email message in Outlook?

David

TOPICS
Acrobat SDK and JavaScript , Windows
751
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 22, 2017 Jan 22, 2017

What you're describing is not really "rich text formatting". That suggest specifying the font style, size, color, etc., and that can't be done using a script. The only thing you can use is plain-text, which includes line-breaks, tabs, etc.

That should work in all email clients.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Feb 15, 2017 Feb 15, 2017

In that case I'm not aware of the underlying problem, but I'll try to explain.

I have several buttons in my form, each adjacent to a text field that contains an email address. The mouse up action on each button has a script attached that employs the app.mailMsg method, with the various parameters, and sets the body of the email to include canned text mixed with values passed to it from variables referencing fields within my form. The script employs formatting such as \r and \n and \t for new paragraphs and indented lines.

When my default mail client is set to Apple's mail and I execute that script, the script initiates the message with all intended formatting in the message body. However, if my default mail client is set to Outlook or Spark, the body of the message loses the intended formatting, and therefore I have only one long line run together, such as "DearJohn,Enclosed you will find ABCDEF.Please do Y.Thank you.Sincerely,David."

I realize not all mail clients may permit the result that is achieved with Apple Mail, but I want other predominant mail clients to employ the intended formatting, so that others using my form can use these canned emails. Perhaps I just don't know the correct mail client settings that are required. I tried setting Outlook to both plain text and html, but neither works. So what do I need to focus on to achieve that end?

I know that on Windows the default mail client must be configured to MAPI to use the app.mailMsg method, but I still lose the formatting when the email message is generated by my script.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 24, 2017 Feb 24, 2017

I am also having the same issue using Outlook for Mac. The body of the message in Outlook ends up all on one line.  I  have tried both adding both  + "\n" +  and + "\r" +  between the lines but neither of them seem to work.

Does anyone know if there is a character that will make these line breaks work in Outlook for Mac?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 24, 2017 Feb 24, 2017
LATEST

Sounds like a bug in Outlook. You should report this issue to Microsoft.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines