![]() | ![]() | ![]() |
This sample shows how to insert dynamic text into a Microsoft Word document using SAS Add-in for Microsoft Office with a SAS Stored Process. In this example, three dynamic values (today's date, actual sales, and predicted sales) are inserted into a Microsoft Word document and updated when you refresh the document.
*Processbody;
data _NULL_; data empty; /* create a table with empty values */
|
Open Microsoft Word and type the following two sentences, inserting placeholders for the fields that you want to make dynamic. We will go back and replace the place holders in the next steps.
As of <date here>, The actual sales are <actual sales here>. The predicted value is <predicted sales here>. |
Somewhere in the document below the text that you entered, run the stored process that you created in Step #1. The results of the stored process will be centered in the document. Select the three title statements and left justify them. Below is a screen show before the titles have been left justified.


These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.
| Type: | Sample |
| Date Modified: | 2008-10-24 15:48:13 |
| Date Created: | 2008-05-02 15:42:11 |
| Product Family | Product | Host | Product Release | SAS Release | ||
| Starting | Ending | Starting | Ending | |||
| SAS System | SAS Add-in for Microsoft Office | Microsoft® Windows® for x64 | 2.1 | 9.1 TS1M3 SP4 | ||
| Microsoft Windows 2000 Advanced Server | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows 2000 Datacenter Server | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows 2000 Server | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows 2000 Professional | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows Server 2003 Datacenter Edition | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows Server 2003 Enterprise Edition | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows Server 2003 Standard Edition | 2.1 | 9.1 TS1M3 SP4 | ||||
| Microsoft Windows XP Professional | 2.1 | 9.1 TS1M3 SP4 | ||||
| Windows Vista | 2.1 | 9.1 TS1M3 SP4 | ||||


