Results 1 to 5 of 5
  1. #1
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cut event trapping (Word 2000 - 2003)

    Create macros named EditCut and EditPaste to trap these commands.

    Note: these macros will trap all invocations of the commands, for example:
    - Selecting Edit | Cut
    - Pressing Ctrl+X
    - Clicking the Cut button on the toolbar.
    - Selecting Cut from the right-click menu.
    You are responsible for making the command do anything - if you create an empty macro

    Sub EditCut()
    End Sub

    you have effectively disabled Cut. You may want to execute the standard action at some point (Selection.Cut, Selection.Paste).

  2. #2
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cut event trapping (Word 2000 - 2003)

    Thank you Hans. I knew about those, my original question was too brief let me explain the problem further. We have these Word documents and sections of the doucments, paragraphs and table entries are marked currently with bookmarks which are a GUID. If the user moves or cuts the sections or table entries around we are able to do comparisons with a new version of the document the next year for doing some report generation by looking for the bookmarks. This works fine is track changes is turned off, the bookmarks get copied or cut and pasted to the other location, but if track changes is turned on then book marks are not cut or copied but remain in the original location. We have spoken to Microsoft about this and it is a defect but they told us they do not plan on fixing it. So we are thinking if we could catch the cut or copy event then we could handle making sure the bookmarks are cut or copied. Oh a fun problem to be sure.

    Thank you

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Cut event trapping (Word 2000 - 2003)

    But that is exactly what the EditCut, EditCopy and EditPaste macros do - they let you create your own "event handlers" for Cut, Copy and Paste. If that doesn't suit you, I don't know an alternative - there are no On Cut etc. events defined - at least not exposed to VBA.

  4. #4
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Cut event trapping (Word 2000 - 2003)

    Is there a way to rap the Cut or Paste event when used in Word?

  5. #5
    3 Star Lounger
    Join Date
    Nov 2002
    Posts
    387
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Cut event trapping (Word 2000 - 2003)

    Thank you Hans and that will all work.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •