Results 1 to 9 of 9
  1. #1
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    Chris,

    You need to look into the Code Librarian in Office 2000 MOD. That way you can package all these routines and post the entire library in one easy to use file.

    I have not officially converted to Office 2000 yet myself, but I've been playing around with it. That Code Librarians looks like a real winner.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    test
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    You mean instead of posting them one at a time? If so, how would I get any feedback on them at all?

    I'm trying, as per Geoff's suggestion, to post code that might be relevant to a real-live query, so that the posted code satifies a forum enquiry.

    I don't have Word2000. I'm still waiting for my shrink-wrapped copy from Steve, but he's not been to his shrink this week ....

  4. #4
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    Chris,

    I'm looking for code to clear the clipboard. I found your routine here, but I can't tell where your strClearClipBoard gets assigned. Care to clarify for me?
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    Apologies. I have added the following code to the original post:

    <pre>Public Function strClearClipboard() As String
    ' Procedure : strClearClipboard
    ' Description: Clear the contents of the clipboard.
    ' Copyright: Chris Greaves Inc.
    ' Inputs: NONE
    ' Returns: STRING previous contents of the clipboard.
    ' Assumes: Nothing
    ' Side Effects: None.
    ' Tested: By the calls shown below.
    ' This is merely a cover function for readability.
    Call strLoadToClipboard("")
    End Function
    </pre>


  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    I still don't see the function or sub

    strLoadToClipboard

    That's ok, though. I posted and got the VBA syntax (which you had too) for the DataObject object.

    Thanks, Chris.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    You don't have this?
    strLoadToClipboard

  8. #8
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Function strAppendToClipboard(strSelected As Strin

    Got it! Thanks.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Function strAppendToClipboard(strSelected As Strin

    <pre>Public Function strAppendToClipboard(strSelected As String) As String

    ' Procedure : strAppendToClipboard
    ' Description: Augment the contents of the clipboard.
    ' Copyright: Chris Greaves Inc.
    ' Inputs: STRING to be appended to the clipboard contents.
    ' Returns: STRING previous contents of the clipboard.
    ' Assumes: Nothing
    ' Side Effects: None.
    ' Tested: By the calls shown below.

    ' Define the clipboard object
    Dim strClipboard As String
    Dim MyData As DataObject
    Set MyData = New DataObject

    ' Obtain the contents of the clipboard
    MyData.GetFromClipboard

    ' We don't handle graphics, only text strings, so ....
    On Error GoTo MustClearClipboard
    strClipboard = MyData.GetText(1)
    On Error GoTo 0
    GoTo GotClipboard
    MustClearClipboard:
    ' If we found a graphic, void the clipboard.
    strClipboard = strClearClipboard
    GotClipboard:
    ' Obtain existing contents
    MyData.GetFromClipboard
    strAppendToClipboard = MyData.GetText

    ' Set new contents of clipboard.
    Set MyData = New DataObject
    MyData.SetText strClipboard & strSelected, 1
    MyData.PutInClipboard
    'Sub TESTstrAppendToClipboard()
    '' Tap the PrtScr key to load a graphic image to the clipboard.
    '' Enter Wordpad and choose Edit, Paste to inspect existing contents, then ....
    'MsgBox strAppendToClipboard(Chr$(13) & "here is message 01")
    'MsgBox strAppendToClipboard("here is message 02")
    'MsgBox strAppendToClipboard("here is message 03")
    'End Sub
    End Function
    </pre>



    (2001/05/03)
    <pre>Public Function strClearClipboard() As String
    ' Procedure : strClearClipboard
    ' Description: Clear the contents of the clipboard.
    ' Copyright: Chris Greaves Inc.
    ' Inputs: NONE
    ' Returns: STRING previous contents of the clipboard.
    ' Assumes: Nothing
    ' Side Effects: None.
    ' Tested: By the calls shown below.
    ' This is merely a cover function for readability.
    Call strLoadToClipboard("")
    End Function
    </pre>


Posting Permissions

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