[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-242293-105":53,"doc-detail-242293-en":126},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":119,"head_meta":121,"extra_data":123,"updated_unix":125},105,"en","sugi-28-advanced-tutorials-paper-16-28-fancy-ms-word-reports-made-easy","SUGI 28 Advanced Tutorials - Paper 16-28 - Fancy MS Word Reports Made Easy","","SAS System for OS/2 and Windows uses Dynamic Data Exchange (DDE) to communicate with other PC applications, enabling Base SAS programs to generate fully customized Microsoft Word documents. The paper presents beginner-to-advanced guidance on inserting and formatting SAS data, graphs, and tables into Word reports using SAS macros. It further demonstrates a DDE-driven Word mail-merge application and explains alternative approaches such as OLE automation, RTF via ODS, and intermediate formats.",{"@graph":63,"@context":118},[64,80,101],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/sugi-28-advanced-tutorials-paper-16-28-fancy-ms-word-reports-made-easy/242293/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":95,"encodingFormat":93,"isAccessibleForFree":96,"interactionStatistic":97},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/sugi-28-advanced-tutorials-paper-16-28-fancy-ms-word-reports-made-easy/242293.png","ImageObject",442,249,{"name":88,"@type":89},"Elsa","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-11","2026-09-12",true,{"@type":98,"interactionType":99,"userInteractionCount":76},"InteractionCounter",{"@type":100},"ViewAction",{"@type":102,"mainEntity":103},"FAQPage",[104,110,114],{"name":105,"@type":106,"acceptedAnswer":107},"What is Dynamic Data Exchange (DDE) used for in SAS-to-Word document creation?","Question",{"text":108,"@type":109},"DDE is a Windows/OS/2 communication protocol that lets DDE-compliant applications talk in a client/server manner. In this context, SAS uses DDE to instruct Microsoft Word to build customized Word documents from Base SAS programs.","Answer",{"name":111,"@type":106,"acceptedAnswer":112},"Why does the paper compare multiple ways to produce MS Word output from SAS?",{"text":113,"@type":109},"The paper explains that choosing a technique depends on goals such as complexity, desired level of control, and the reader’s programming experience. Different mechanisms come with different learning curves and tooling languages.",{"name":115,"@type":106,"acceptedAnswer":116},"How does the paper structure the learning path for building Word documents with DDE?",{"text":117,"@type":109},"It introduces the concept of DDE first, then walks through creating Word documents from scratch using Base SAS code for text, tables, graphics, and finishing elements like headers, footers, and hyperlinks. It then shows a template-based approach and finally demonstrates reusable SAS macros to generate the example credit card statement letter.","https://schema.org",{"og:url":78,"og:type":120,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":122,"canonical":78},"index,follow",{"doc_id":124,"site_id":56},242293,1791480310,{"code":4,"msg":5,"data":127},{"doc_id":124,"user_id":128,"nickname":88,"user_avatar":129,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":130,"file_id":131,"file_url":132,"file_type":133,"file_size":134,"view_count":135,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":136,"language":137,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":138,"faqs":139,"seo_title":140,"seo_description":61,"update_tm":141,"read_time":79},137455077381,"https://ap-avatar.wpscdn.com/davatar_994ba38a5ba835b3df7d355c54d3ed8d","SUGI 28 Advanced Tutorials  \nPaper 16-28  \nFancy MS Word Reports Made Easy: Harnessing the Power of Dynamic Data  \nExchange  \n— Against All ODS, Part II —  \nWilliam W. Viergever, Viergever & Associates  \nKoen Vyverman, SAS Netherlands  \nAbstract  \nFor many years, the SAS System for OS/2 and Windows has had the ability to talk to other PC applications by means of Dynamic Data Exchange (DDE). DDE enables the creation of fully customized Microsoft Word documents from within a Base SAS program, and is therefore ideal for automating high quality output from the SAS System. Using a set of easy-to-use SAS macros, we show the beginner-toadvanced SAS user how to insert and format SAS data, graphs, and tables into a Word report. As a further demonstration of the myriad possibilities, a DDE-driven Word mail-merge application is constructed  \n0 Introduction  \nNotwithstanding the SAS System’s prodigious capacity for reading and writing files of virtually any pedigree, the generation of output in the form of MS Word documents has always been a bit of a pain—to say the least. A number of mechanisms come to mind:  \n• intermediate file formats like flat-file layouts and HTML in particular can be easily produced by means of some Base SAS code, and may be converted or incorporated into MSWord documents by means of VBA macros.  \n• OLE automation from within a SAS/AF application can create Word documents.  \n• the rather recent addition of the RTF destination to the Output Delivery System (ODS) makes it particularly easy to deliver output that can be read by the MS Word application.  \n• and then there’s Dynamic Data Exchange (DDE), to which the present paper is devoted.  \nWhich of these techniques should you choose? Which one is easier? Which one allows the highest level of control over the output? All seemingly valid questions, but in fact, they are largely nuncupatory since the answer must always be ‘it depends’…  \nIt depends on the level of complexity you’re trying to achieve: do you simply wish to see a piece of proc tabulate output as atable in a Word document? Or did you have a complex page layout in mind, with several items of tabular and graphical information sitting at precise locations and being formatted in some very specific manner?  \nIt depends on your programming experience: how familiar are you with VBA? Are you an OLE and SCL whiz-kid? To get the most out of the ODS, the proc template formalism must be mastered. Are you considered a proc template guru? DDE employs Microsoft’s old MS Word macro language from before the days of VBA: WordBasic. Ever heard of it?  \nThe point we want to make here is that none of the available techniques is simple and straightforward, each using its own  \nparticular lingo that needs to be mastered, each having a definitely mountainous learning curve.  \nThe purpose of this paper is to take some of the steepness out of the DDE learning curve by providing numerous examples of how to build up a Word document step by step, and to introduce a set of SAS macros that encapsulate some particularly useful and frequently recurring DDE/WordBasic functionality.  \nThe first section introduces the concept of DDE. It is followed by three sections in which the ground-work is laid for building a Word document from scratch by means of simple Base SAS code. This includes inserting and formatting of text, tables, and graphics, as well as how to add some nifty finishing touches to a document, like headers, footers, and hyperlinks. As an example, we build a personalized credit card statement based on data from a SAS data set.  \nThen we show how to simplify the process of document creation by means of a template document that already contains all the properly formatted static elements, together with place-holders for the variable bits of output coming from SAS. We reproduce the card statement using this technique.  \nFinally we introduce the set of SAS macros, and show how to use them in order to, once more, generate our credit c","cbCaijEdLLpd70Gx","https://ap.wps.com/l/cbCaijEdLLpd70Gx","pdf",192806,6,10,"English","# Introduction\n## Options for creating MS Word output\n## When to choose DDE vs other mechanisms\n## Purpose and structure of the paper\n# Introducing DDE from SAS to Word\n## DDE concept and client/server communication\n## SAS filename statement and DDE-triplet\n## Prerequisites for using DDE","[{\"question\":\"What is Dynamic Data Exchange (DDE) used for in SAS-to-Word document creation?\",\"answer\":\"DDE is a Windows/OS/2 communication protocol that lets DDE-compliant applications talk in a client/server manner. In this context, SAS uses DDE to instruct Microsoft Word to build customized Word documents from Base SAS programs.\"},{\"question\":\"Why does the paper compare multiple ways to produce MS Word output from SAS?\",\"answer\":\"The paper explains that choosing a technique depends on goals such as complexity, desired level of control, and the reader’s programming experience. Different mechanisms come with different learning curves and tooling languages.\"},{\"question\":\"How does the paper structure the learning path for building Word documents with DDE?\",\"answer\":\"It introduces the concept of DDE first, then walks through creating Word documents from scratch using Base SAS code for text, tables, graphics, and finishing elements like headers, footers, and hyperlinks. It then shows a template-based approach and finally demonstrates reusable SAS macros to generate the example credit card statement letter.\"}]","SUGI 28 Advanced Tutorials - Paper 16-28 - Fancy MS Word Reports Made Easy | PDF",1789188848]