The SAS Output Delivery System and reporting techniques

Add Text to ODS MSOffice2K Email

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 84
Accepted Solution

Add Text to ODS MSOffice2K Email

I am trying to add some text to a daily process that creates some PDF's, attaches them to an email, writes a proc tabulate table to the body of the email and sends.  I normally would use a data _null_ and put statement to write text to the body of the email, but that seems to generate a second email rather than writing to the same email.  I have tried ODS HTML TEXT as well with the same result.  Does anyone know how to accomplish this?  Thanks!

/* Send Email */

option emailhost='localhost';

filename mymail email

  from="me"

  sender="me"

  to= ("me")

  subject="Tracking"

  content_type="text/html"

  attach = ('Sample1.pdf'  'Sample2.pdf'');

ods MSOffice2K

body=mymail

style=BarrettsBlue;

<proc tabulate code>

ods msoffice2k close;

goptions reset=all;


Accepted Solutions
Solution
‎06-02-2014 02:57 PM
SAS Employee
Posts: 88

Re: Add Text to ODS MSOffice2K Email

Try using the ODS MSOffice2K TEXT= option to add your text that you would like to display in the body of the email.


filename mymail email
  to= ("me.com")

  subject="Tracking"

  content_type="text/html";

 

ods MSOffice2K

body=mymail

style=BarrettsBlue;

ods msoffice2k text="this is a test";

proc tabulate data=sashelp.class;
class age;
var height;
table age,height;
run;

ods msoffice2k close;

View solution in original post


All Replies
Solution
‎06-02-2014 02:57 PM
SAS Employee
Posts: 88

Re: Add Text to ODS MSOffice2K Email

Try using the ODS MSOffice2K TEXT= option to add your text that you would like to display in the body of the email.


filename mymail email
  to= ("me.com")

  subject="Tracking"

  content_type="text/html";

 

ods MSOffice2K

body=mymail

style=BarrettsBlue;

ods msoffice2k text="this is a test";

proc tabulate data=sashelp.class;
class age;
var height;
table age,height;
run;

ods msoffice2k close;

Frequent Contributor
Posts: 84

Re: Add Text to ODS MSOffice2K Email

Thanks.  Works perfectly.  Might you also now how to control line breaks in ods MSOffice2K?  When I use the HTML breaks I would use for ODS HTML, it does not apply them.  Or how to control the font?  Style(fontweight=BOLD) does not seem to work.

☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

Discussion stats
  • 2 replies
  • 745 views
  • 0 likes
  • 2 in conversation