| Date: | Mon, 19 Apr 1999 09:59:40 +1200 |
| Reply-To: | Mark Bodt <markbodt@STSS.CO.NZ> |
| Sender: | "SAS(r) Discussion" <SAS-L@UGA.CC.UGA.EDU> |
| From: | Mark Bodt <markbodt@STSS.CO.NZ> |
| Subject: | Re: DDE-triplet to Word 97 |
| In-Reply-To: | <ywsk8vdtgu9.fsf@world.std.com> |
| Content-Type: | text/plain; charset="us-ascii" |
|---|
At 02:54 16/04/99 GMT, you wrote:
>"R.B. Hof" <rhof@ittopics.nl> writes:
>> Hello
>>
>> Who can tell me what the DDE-triplet is for accessing Microsoft Word 97
from
>> SAS. Word 6 is no problem, then you use WINWORD but this doesn't work with
>> WORD97.
>>
>> Thanks in advance
>>
>> Ronald Hof
>
>Have you tried this trick?
>
>Go into the MS Word document in question.
>
>Mark some text. That is, select it, in Windoze speak.
>
>Do a C-c (Control C) to copy the selection to the clipboard.
>
>Fire up SAS.
>
>Go to Locals->DDE Triplet.
>
>The resulting dialog box should contain the DDE triplet for the
>selected text. Conveniently, it is highlighted so you can C-c it to
>the clipboard and then paste it into your filename statement.
>
>From there, you can tinker with the Item portion to get you what you
>want.
>
>HTH - Jack
>
>--
>Jack N Shoemaker shoe@world.std.com
>
Jack,
That works well in Excel, but doesn't work with Word. In word the DDE
triplet references a bookmark, so you need a bookmark defined in your
document, and even then the copy to clipboard suggestion doesn't work. (I
have just tried and confirmed this)
The DDE triplet is the same for Word 6 and Word97. I have an application
that runs on my client's Windows 3.11 machine (Word 6) and on my Windows
NT4 machine (Word97) they use the same triplets being:
System triplet:
---------------
Winword|system
Data triplet:
-------------
winword|document_name!bookmark
e.g document is called 'bert.doc' in the d: drive and has a bookmark called
address.
DDE triplet is: winword|d:\bert.doc!address
One thing that may cause problems is with long filenames. e.g. c:\my
documents\bert.doc. In this case, make sure you use double quotes rather
than single quotes when you specify your filename statement.
HTH
Mark
Mark
+------------------------------------------+--------------------------+
| Mark Bodt | |
| Sunken Treasure Software Systems Ltd | SAS Institute(NZ) Ltd. |
| Specialising in SAS(R) Software | Quality Partner. |
| Consultancy in the Asia / Pacific Region | |
+------------------------------------------+--------------------------+
| PO Box 9472, Marion Square, Wellington, New Zealand |
| Ph (025) 725 386 Fax +64 4 385 8670 Email: markbodt@stss.co.nz |
+---------------------------------------------------------------------+
|