You are visitor number ????? since 2 October 2004.
Go to Howard Kaikow's home page

Date: 2 October 2004
From: Howard Kaikow <>
Subject: OLE Automation Problem (Word to PowerPoint)

When I Copy a selection from a Word document, then Paste into PowerPoint, a spurious OLE_Linknn bookmark is inserted into the Word document.

This problem occurs with Word 2002, and does not occur with Word 97 or Word 2000, not yet tested with Word 2003.

The problem also occurs if I run the code from VB 6. In this case, I had to modify the code to start Word and, check that there was already a Word document open. I then imported the VB 6 code into VS .Net. Same problem. Due to a bug in VB .Net (see KB article Q315981), I had to slightly modify the VB .Net code.

The bookmark is NOT created if PowerPoint is already running when the Word macro is run.

If PowerPoint is NOT running when the Word macro is run, the bookmark is added to the Word document as a result of creating the new instance of PowerPoint, i.e., even before the Word macro Pastes into PowerPoint. Note that the bookmark is added ONLY if there is not already a bookmark marking the full text to be copied.

I can reproduce the problem as follows:

  1. I created the macro in a brand new template and added a reference to PowerPoint to the project.

  2. Make sure PowerPoint is not running.

  3. Double-click on the template, which opens a blank document attached to the OLEPPT template.

  4. For this test, you need not insert any text in the Word document. If you do, just place the insertion point in the text before you run the Word macro

  5. Open the VBIDE, e.g., by using Alt + F11. Display the Immediate window so you can see the Debug.Print output.

  6. Run the macro.

  7. If the problem is reproduced, an OLE_Linknn bookmark will have been added to the Word document.

  8. The macro will have created a PowerPoint presentation file in your default Word directory. You can delete the file.

  9. OK, now delete the OLE_Linknn bookmark, start PowerPoint, and rerun the macro.

  10. Hopefully, you will now find that no OLE_Linknn bookmark has been added,

  11. The version of the macro I posted on 28 April 2002 will have created a PowerPoint presentation file in your default Word directory. You can delete the file. The 29 April 2002 version does not create that file.

I was using:

The bookmark appears to be getting assigned as if a hard link was being used, rather than a Paste. The bookmark serves no purpose.

That's a real crock as it causes Word to request that the user save the Word document even tho the user may have made no changes to the document. I could add code to eliminate that bookmark and set the document's Saved property to True if there is no other reason to remain at False, but that's an even bigger crock.