BookmarkSubscribeRSS Feed
VD
Calcite | Level 5 VD
Calcite | Level 5

Hi,

I want to write a code which outputs a text in a html file. For instance,

ods html text="^S={font=('Arial',20pt,bold) outputwidth=100% just=c foreground=red}Test String";

It works on an html output but I also want to get the same text using MS Office add-in. So, when I run a stored process using the add-in, the text should appear in the MS Word document. Is there a way of doing this without explicitly coding rtf options?

Otherwise, what would be the rtf options which allows me to get the output from the office add-in?

Many thanks.

VD

3 REPLIES 3
ballardw
Super User

I don't use the office add in so this is a gues, but I would try using just ODS Text=. Then the text should go to all open ODS destinations.

Cynthia_sas
SAS Super FREQ

Hi:

In your stored process code, you can change your value for the reserved macro variable for destination:  &_ODSDEST=RTF or &_ODSDEST=HTML;  or you can explicitly use client-side options to alter the Stored Process results using the Add-in Options menu. If you do NOT have any overrides for &_ODSDEST, it is possible that the default result type in Word is SASReport XML.  I'm not sure that SASReport XML will accept ODS TEXT= strings and/or style overrides. So, you might want to be sure that the Word Add-in is not receiving SASReport XML results -- either by explicitly coding a value for &_ODSDEST or by checking the Add-in Options before you run the SP.

However, as long as you use ODS HTML TEXT=, ODS RTF would not get sent your text string. As ballardw says, the simple form ODS TEXT= is a better choice because it will write to all open destinations.

cynthia

VD
Calcite | Level 5 VD
Calcite | Level 5

Thank you, both.

I am now working on hard coding the ods options for the required outputs, so hopefully will work then.


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!

Discussion stats
  • 3 replies
  • 831 views
  • 0 likes
  • 3 in conversation