BookmarkSubscribeRSS Feed
syam_india_kochi
Calcite | Level 5
Hi ,

I have been using SAS EG4, for my reporting (automation). Though automation part is done I would like to put my company logo also in the back ground of my mail as a water mark...Can somebody help..?
here is the mailing code I write to send HTML output through "ThunderBird"(my mail box)..




FILENAME SACHIN EMAIL

TO=("")

FROM=("")

CC=("")

BCC=("")

SUBJECT=("PROGRAM LEVEL ACTIVITY COUNTS")

/*ATTACH="/BIU/ANALYTICS/Syam_Wealth_Banking/Out1.xls"*/

CT="TEXT/HTML";


ODS _ALL_ CLOSE;

ODS HTML CLOSE;

ODS HTML BODY=SACHIN RS=NONE STYLE=NORMAL;


TITLE1 J=CENTER HEIGHT=12PT COLOR=BLACK BOLD FONT=ZURICH "PROGRAM LEVEL ACTIVITY COUNTS AS ON &MONTHH";
PROC REPORT DATA=OUTPUT OUT=OUTPUT1 style=sketch;
COLUMN 'Program Level Activity'n COUNT;
DEFINE 'Program Level Activity'n/"Program Level Activity";
DEFINE COUNT/"Count" format=comma10.0;

COMPUTE 'Program Level Activity'n;
if 'Program Level Activity'n="Total member base (as on &MONTHH)" then do;
CALL DEFINE(_ROW_,"STYLE","STYLE=[FOREGROUND=WHITE BACKGROUND=MAROON FONT_WEIGHT=BOLD]");
end;
endcomp;
RUN;

footnote1 j=left height = 3 bold 'Click Here to download';
ODS HTML CLOSE;
ODS LISTING;


I have tried style custom in HTML...by defining proc template...That is generating Background images in my HTML output..But the same output when I write it, in the mailing body, images are not showing up...

kindly help..!!
3 REPLIES 3
Cynthia_sas
SAS Super FREQ
Hi:
This previous forum posting
http://support.sas.com/forums/thread.jspa?messageID=27609毙
tells how to post code so that symbols like < and > in the code do not interfere with the forum posting mechanism. It also explains how to use the [pre]and [/pre] tags around your code and output in order to maintain indenting and spacing.

cynthia
Cynthia_sas
SAS Super FREQ
Hi:
Although your forum posting is quite hard to read, I do understand the general sense of your question. Let's talk about ODS HTML without the complication of email or Outlook. With regular ODS HTML files created by Base SAS and meant to be opened with a browser, any images that you use MUST be accessible to the browser (or rendering application) -- when the HTML file is opened.

So this means that images, any images, are NOT embedded in the HTML file. And so, if your template or preimage style attribute would refer to an image like this:
[pre]
preimage="c:\temp\kermit.jpg"
[/pre]
Then ODS would build an <IMG> tag with this SRC=attribute:
[pre]
<img alt="...." src="c:\temp\kermit.jpg">
[/pre]

The above IMG tag would work on a local machine (because the image was physically stored in c:\temp; however, if the HTML file that contained the IMG tag was ever sent to anyone, unless they ALSO had the same image in c:\temp, the rendering of the HTML file would show a red 'X' instead of an image because the image would not be located when the HTML file was RENDERED.

That's how ODS and HTML work outside the context of Microsoft Outlook. You said that
I have tried style custom in HTML...by defining proc
template...That is generating Background images in my
HTML output..But the same output when I write it, in
the mailing body, images are not showing up...


So that means you are having some success with your images when you send the mail as an attachment. However, I am not surprised that your images do not show up in your E-mail body when you try to put the HTML report -- with image into the body of your email. When I use Microsoft Outlook to put an image into an email when I just create an email manually -- no using ODS -- let's say I want to use kermit.jpg as a background for my mail message, I have to follow this click path in Outlook to insert the image:
Options --> Page Color --> Fill Effects --> Picture Tab --> Select Picture

ODS output created by a style template would never be able to touch the pulldown menus and tabs in Microsoft Outlook. For more help with using the email features of SAS and ODS, you might want to search support.sas.com for the many Tech Support notes and previous forum postings on this topic. You may need to work with Tech Support to verify that you can even get an image into the body of an Outlook email when using ODS HTML and the EMAIL engine.

cynthia
syam_india_kochi
Calcite | Level 5
Hi Cynthia,
Thanking you for you guidance. I will try to bring the same into the notice of SAS Tech Support..

Thanks,

Syam

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 3 replies
  • 1623 views
  • 0 likes
  • 2 in conversation