LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (July 2002, week 3)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
=========================================================================
Date:         Fri, 19 Jul 2002 14:03:54 -0400
Reply-To:     "Delaney, Kevin P." <khd8@CDC.GOV>
Sender:       "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:         "Delaney, Kevin P." <khd8@CDC.GOV>
Subject:      Re: DDE writing to Word document footer
Comments: To: Quentin McMullen <QuentinMcMullen@WESTAT.COM>
Content-Type: text/plain; charset="ISO-8859-1"

Quentin,

Although I couldn't get DDE to write to the bookmark "Sometext" in the footnote either, my playing did uncover:

filename wordsys dde "winword|system"; data null; file wordsys; put '[FileNewDefault]'; put '[ViewFooter]'; put '[Insert "spent many long hours contemplating the Camembert."]'; put '[FileSaveAs .Name = "' "c:\&desk.playout.doc" '"]'; *put '[Fileclose]';*if done; run;

Which seems to do what you want??

I would expect there is at least one KiloVolt of input on the subject lurking somewhere in the wings...

Kevin Delaney KDelaney@cdc.gov

-----Original Message----- From: Quentin McMullen [mailto:QuentinMcMullen@WESTAT.COM] Sent: Friday, July 19, 2002 11:09 AM Subject: DDE writing to Word document footer

Hi folks,

Since rumor has it that PowerPoint is not willing to listen to DDE commands, I'm getting my feet wet trying to export some graphs to Word 97.

Below code, cobbled together with help from archives, attempts to write some text to the footer of a word doc. If I comment out the [ViewFooter] command, it works fine, and the second data step writes text to the main document. But when I uncomment it, I still can't write to the footer. When I look at the document in word, I can see the bookmark is there, but I can't seem to write to it. I must be missing something simple...

filename wordsys dde "winword|system"; filename wordbkmk dde "winword|c:\junk\playout.doc!sometext" notab lrecl=1024;

data _null_; file wordsys; put '[FileNewDefault]'; put '[ViewFooter]'; put '[EditBookmark.Name="sometext",.Add]'; put '[FileSaveAs .Name = "' "c:\junk\playout.doc" '"]'; run;

data _null_; file wordbkmk; put 'spent many long hours contemplating the Camembert.'; run;

Kind Regards,


Back to: Top of message | Previous page | Main SAS-L page