PRB: Can't Use DDE Links (Paste Link) Between VB & Word 6.0

Last reviewed: June 27, 1996
Article ID: Q119114
The information in this article applies to:

- Standard and Professional Editions of Microsoft Visual Basic for

  Windows, versions 2.0 and 3.0
- Microsoft Word for Windows, versions 6.0 and 6.0a

SYMPTOMS

The shortcut method for creating a DDE-linked item between Microsoft Visual Basic and Microsoft Word for Windows by choosing Paste Special from the popup menu no longer works with Word versions 6.0 or 6.0a.

CAUSE

Microsoft Word for Windows version 6.0 no longer uses DDE links when copying information to the clipboard; it uses OLE links. This is why in Visual Basic the Paste Link menu command is disabled (grayed out) when you copy text from Word to the clipboard. Other applications that recognize OLE links, such as Microsoft Excel version 5.0, allow you to perform a paste link, but Visual Basic version 3.0 does not support paste link in text boxes and labels.

RESOLUTION

To perform DDE with Word version 6.0, you must set up the DDE links manually. For more information on this method, please see the following article in the Microsoft Knowledge Base:

ARTICLE-ID: Q74862

TITLE     : DDE Example Between Visual Basic and Word for Windows

MORE INFORMATION

Because Word version 6.0 uses OLE links, you can paste them into the OLE control (MSOLE2.VBX). The following steps show you how to accomplish this:

  1. Start Word version 6.0 and enter text in your document.

  2. Highlight the text and choose Copy from the Edit menu.

  3. In Visual Basic, start a new project. Form1 is created by default. Place an OLE control (OLE1) on the form. When the Insert Object dialog box comes up, choose Cancel.

  4. With the right mouse button, choose the OLE control and choose Paste Special from the popup menu. In the Paste Special dialog box, select either Paste or Paste Link, and then choose OK.


Additional reference words: 2.00 3.00 6.00 6.00a PasteLink WinWord
KBCategory: kbinterop kbole kbprg kbprb
KBSubCategory: IAPDDE IAPOLE


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: June 27, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.