4 Replies Latest reply: Jun 11, 2009 12:43 PM by Mark Janssen RSS

    Copy text to clipboard


      For a certain QV documentI need to create a macro to copy a field value to the clipboard so it can be used in another application. The macro I created works perfect in the local desktop client (8.5) but it refuses to work by using the ActiveX browser plugin.


      Sub CopyCNR
      set ContractNr = ActiveDocument.fields("Contract_Number").GetSelectedValues
      If ContractNr.Count=1 Then
      Msgbox("Select one value.")
      End If
      End Sub

      The macro partly works though the ActiveX plugin and does result in an message when not selecting one single value. But the problem is that no value is copied to the clipboard. Is there a solution for this problem.

      Another thing I have noticed is that when pressing the right mouse button on a text object to see the menu. The option/menu "Copy to Clipboard" is grayed out.

      regards Mark