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



The information in this article applies to:

  • Microsoft Visual Basic Standard Edition for Windows 2.0
  • Microsoft Visual Basic Standard Edition for Windows 3.0
  • Microsoft Visual Basic Professional Edition for Windows 2.0
  • Microsoft Visual Basic Professional Edition for Windows 3.0
  • Microsoft Word for Windows 6.0
  • Microsoft Word for Windows 6.0a

This article was previously published under Q119114

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:

74862 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.

Modification Type:MajorLast Reviewed:12/9/2003
Keywords:kbprb KB119114