Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    5

    Question Unanswered: How to copy only data from a record to clipboard or Word?

    Hi all,

    I have made a simple database for our clients and contactpersons.
    What i want to do now is making some sort of label for a envelop or
    to be copied to the clipboard for easy pasting in word files or something.

    For example it want the following format:

    Company name
    Contact person
    Adress
    PCode City
    Country

    How can i do that? I tried to copy a selected record and then paste it into Word but then i also get the field names too.
    I only want to copy the data from the selected record.
    Any help appreciated, thx!

    ......Jimmy

  2. #2
    Join Date
    Nov 2003
    Posts
    1,487
    If what you want to do is simply create envelope labels then create a Access report to do the job. You'll be surprised at how easy it is.

    If you still want to play with the clipboard then take a look at the Cliboard functions I have attached to this post. Perhaps they will help you with what you need.

    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    5
    Hi,

    Thx for the quick reply.
    I already tried the envelop labels but that is not exactly what i need.
    I have looked at your Clipboard function and came up with another idea.
    I just made a very simple form with just one textbox.
    Now i just want to place a few lines in the textbox and i used the following code :

    Code:
    Private Sub Form_Open(Cancel As Integer)
    On Error GoTo Err_Form1_Click
    
      Dim TmpSting As String
      
      With Forms![RI_ADRESSEN_TRYOUT]
      TextCPers = "Bedrijf : " & .[bedrijf] & Chr(13) & _
                  "Afdeling : " & .[Afdeling]  & Chr(13)
      End With
    
    Exit_Form1_Click:
        Me.Refresh
        Exit Sub
    
    Err_Form1_Click:
        MsgBox Err.Description
        Resume Exit_Form1_Click
    End Sub
    This seems to work fine exept for the carriage return Chr(13).
    In the output i see a strange character instead of a carriage return.
    Any idea how i can get a carriage return i a textbox ?

    Thx
    Jimmy
    Last edited by hendrixx; 03-14-04 at 11:20.

  4. #4
    Join Date
    Nov 2003
    Posts
    1,487
    Instead of using Chr$(13), try using vbNewLine.


  5. #5
    Join Date
    Nov 2002
    Location
    Netherlands
    Posts
    5
    Oh my god , so easy huh ?

    Thx CyberLynx !

Posting Permissions

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