Date: Wed, 26 Oct 2011 13:01:25 -0700
Reply-To: Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Sender: "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From: Mary Rosenbloom <mary.rosenbloom.sas@GMAIL.COM>
Subject: Re: Is DDE the Way to Go Here?
In-Reply-To: <201110261949.p9QFseQi016698@waikiki.cc.uga.edu>
Content-Type: text/plain; charset=ISO-8859-1
Thanks Ya,
Both solutions sound really interresting. Thanks for your help!
Cheers,
Mary R.
On Wed, Oct 26, 2011 at 12:49 PM, Ya Huang <ya.huang@amylin.com> wrote:
> Mary,
>
> My experience with DDE, especially with newer version of Office (post
> 2007) wasn't very good. It seems to me some of the DDE command are not
> supported anymore.
>
> I can think of two way without using DDE. First, fill in the form with
> some specical text as the token or placeholder, then save the file as
> rtf, since the rtf file is plain text, you can parse the file and
> replace those token with your real data. I've posted a sample long time
> ago here on SAS-L.
>
> Another way, I think maybe better is to save the word file as docx file
> with newer Word (Word 2007). Then replace the data with your real data by
> going to the underline XML file, which might be easier than parsing the
> rtf file.
>
> Try to rename you *.docx file as *.zip, then you can see under the zip
> folder, there is one folder for document, which is what the real data in
> xml format is located. Try to manually change a few data points and
> save it, then rename back to *.docx and see what happens.
>
> Ya
>
>
> On Wed, 26 Oct 2011 14:08:01 -0400, Mary Rosenbloom
> <mary.rosenbloom.sas@GMAIL.COM> wrote:
>
>>Hi all,
>>
>>I have a Word document which is a controlled form (per SOP) and I need to
>>use the form as a template and add information to it. I'm thinking that
>>the best way to do this is with DDE, but wanted to check in here to see if
>>anyone else had any other suggestions.
>>
>>I have used DDE a lot in the past at a previous job, but am now having
>>trouble remembering all of the old commands. I used to have access to
>>Word 6, and could use the macro editor within that to help me figure out
>>the Wordbasic commands, but now it's a bit of a guessing game.
>>
>>Does anyone have any suggestions:
>>(1) Alternative to DDE when you need to write into an existing Word
>>document
>>(2) Good source for Wordbasic commands
>>
>>Thanks in advance.
>>
>>Cheers,
>>Mary R.
>
|