<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Read page 2 of multiple rtf files in ODS and Base Reporting</title>
    <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/377843#M18973</link>
    <description>&lt;P&gt;Try opening the file using the full path and X command to Word and then your DDE code.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2017 17:01:47 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2017-07-20T17:01:47Z</dc:date>
    <item>
      <title>Read page 2 of multiple rtf files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/377837#M18972</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to read the first 2 pages of multiple rtf files and put them into 1 document.&amp;nbsp; Everything I have found says I need to use dde.&lt;/P&gt;&lt;P&gt;I tried the following program (I've simplified it as much as possible).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;%macro s;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%LET&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; RC=&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%SYSFUNC&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;(SYSTEM(START WINWORD));&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;FILENAME WORD_F DDE &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'WINWORD|SYSTEM'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;DATA _NULL_;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;X=SLEEP(&lt;/FONT&gt;&lt;STRONG&gt;&lt;FONT color="#008080" face="Courier New" size="2"&gt;15&lt;/FONT&gt;&lt;/STRONG&gt;&lt;FONT face="Courier New" size="2"&gt;); &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;DATA _NULL_;&lt;/P&gt;&lt;P&gt;FILE WORD_F;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;PUT &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'[FILEOPEN .NAME = "D:\tmp\tmp.rtf"]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;PUT &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'[FILECLOSEALL]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;PUT &lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'[FILEEXIT]'&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;RUN;&lt;/P&gt;&lt;P&gt;%mend;&lt;/P&gt;&lt;P&gt;%s;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is as simple as I could get it yet I am still getting this error:&lt;/P&gt;&lt;P&gt;NOTE: The file WORD_F is:&lt;/P&gt;&lt;P&gt;DDE Session,&lt;/P&gt;&lt;P&gt;SESSION=WINWORD|SYSTEM,RECFM=V,LRECL=32767&lt;/P&gt;&lt;P&gt;ERROR: DDE session not ready.&lt;/P&gt;&lt;P&gt;FATAL: Unrecoverable I/O error detected in the execution of the DATA step&lt;/P&gt;&lt;P&gt;program. Aborted during the EXECUTION phase.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any ideas on what is causing this error or is there a better way than dde?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Marie&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 16:40:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/377837#M18972</guid>
      <dc:creator>mschorn</dc:creator>
      <dc:date>2017-07-20T16:40:08Z</dc:date>
    </item>
    <item>
      <title>Re: Read page 2 of multiple rtf files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/377843#M18973</link>
      <description>&lt;P&gt;Try opening the file using the full path and X command to Word and then your DDE code.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 17:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/377843#M18973</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2017-07-20T17:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: Read page 2 of multiple rtf files</title>
      <link>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/384807#M18993</link>
      <description>&lt;P&gt;I am just curious: Why do you use SAS to solve that problem?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Aug 2017 21:18:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/ODS-and-Base-Reporting/Read-page-2-of-multiple-rtf-files/m-p/384807#M18993</guid>
      <dc:creator>error_prone</dc:creator>
      <dc:date>2017-08-01T21:18:23Z</dc:date>
    </item>
  </channel>
</rss>

