Results 1 to 4 of 4

Thread: pasting to a RTF file without losing the formatting

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Moncton, NB, Canada
    Posts
    4

    Post

    I'm trying to paste information from the clipboard to a Rich Text File box.

    When I try to paste using the code 'clipboard.gettext' I get the text but I lose the formatting.

    I've tried several things and nothing works. If I use the keyboard and do a control V, it works so I know that what I want has made it to the clipboard OK.

    Other attempts have delivered the code as well as the text, but I can't keep the formatting.

    None of my references have anything useful for me

    Thanks in advance.

  2. #2
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Post

    try this:

    Code:
    'to set text:
    
    clipboard.settext rtf1.textrtf
    rtf1.text = ""
    
    '---------------------------------------
    to get text:
    rtf1.text = ""
    rtf1.textrtf = clipboard.gettext
    and hey presto, it keeps your formatting (i think???) test it tell me if it works

  3. #3

    Thread Starter
    New Member
    Join Date
    Feb 2000
    Location
    Moncton, NB, Canada
    Posts
    4

    Post

    David
    I tried that but it gives the formatting information as text and it ends up unreadable.

    I also tried a variety of combinations of hDC. This is required in a print statement for RTF text to maintain the formatting. It didn't work.

    Thanks

    Jim

  4. #4
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527

    Post

    make sure it says
    rtf1.textrtf = clipboard.gettext

    ok
    any more problems, just post again ok

Posting Permissions

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



Click Here to Expand Forum to Full Width