Results 1 to 2 of 2
  1. #1
    2 Star Lounger
    Join Date
    Jul 2003
    Location
    Park City, Utah
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Put Text In Clipboard (Word 2003)

    Post deleted by jeanieb

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

    Re: Put Text In Clipboard (Word 2003)

    If you don't have a userform in your document or template, do the following, strange as it may seem:
    - Select Insert | UserForm
    - Right-click the userform in the Project Explorer.
    - Select Remove UserForm1... from the popup menu.
    - Click No in the dialog that appears, asking you whether you want to export UserForm1.
    The purpose of this excercise is to create a reference to the Microsoft Forms 2.0 Object Library. (You could also set it in the Tools | References dialog)

    You can now use code like this:

    Dim objData As New DataObject
    Dim strUploadPath

    strUploadPath = "C:WebmedxCQI Coaching" & strFilename
    ' Copy string into data object
    objData.SetText strUploadPath
    ' Place string in Windows clipboard
    objData.PutInClipboard
    ' Release object memory
    Set objData = Nothing

Posting Permissions

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