☑ This topic is solved.
Need further help from the community? Please
sign in and ask a new question.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 10-18-2022 04:55 AM
(801 views)
Hi,
i'm using some code - see below - to send myself an e-mail, where the body contains:
- first paragraph
- output from a table
- last paragraph
The first and last paragraph are left-aligned, which is good.
But the output from the table is center-aligned, which I want to change to also left-aligned.
I can't make that work.
What I tried to do in my code below is put '<p align="left"> _infile_ </p>'; - but that didn't give me the wanted result.
Does anyone has a solution for this?
%macro email_output; %if &totobs. > 0 %then %do; filename REPORT "%sysfunc(pathname(work))\test.html"; filename SEND email to = "x.y@z.z.z" subject = "WEBSERV: error!" from = "x.y@z.z.z" content_type = "text/html"; ods html file=REPORT; proc print data=WORK.QUERY_CHECK_DOUBLES; run; ods html close; data _null_; infile REPORT; file SEND; input; if _infile_ = '<html>' then do; put '<p>First Paragraph </p>'; end; if _infile_ ne '</html>' then put _infile_ ; /* put '<p align="left"> _infile_ </p>';*/ else do; put '<p>Last Paragraph</p></html>'; end; run; %end; %mend;
1 ACCEPTED SOLUTION
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Have you tried
options nocenter;
?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, that did the job.
Always nice when there exists simple solutions.