SAS Office Analytics, SAS Add-In for Microsoft Office, and other integrations

html and word

Reply
Frequent Contributor
Frequent Contributor
Posts: 94

html and word

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

Grand Advisor
Posts: 9,703

Re: html and word

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.

SAS Super FREQ
Posts: 8,643

Re: html and word

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

Frequent Contributor
Frequent Contributor
Posts: 94

Re: html and word

Thank you, both.

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


Post a Question
Discussion Stats
  • 3 replies
  • 269 views
  • 0 likes
  • 3 in conversation