Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Clipboard paste formated text in Word

Clipboard paste formated text in Word

Scheduled Pinned Locked Moved C#
comquestion
8 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    J Offline
    juliogyn
    wrote on last edited by
    #1

    Hi, i managed to paste the text in word document, but the text loses text formatting (bold, italic, center justify). I followed this article: http://www.neodynamic.com/ND/FaqsTipsTricks.aspx?tabid=66&prodid=3&sid=36[^] What should i do ?

    L OriginalGriffO 2 Replies Last reply
    0
    • J juliogyn

      Hi, i managed to paste the text in word document, but the text loses text formatting (bold, italic, center justify). I followed this article: http://www.neodynamic.com/ND/FaqsTipsTricks.aspx?tabid=66&prodid=3&sid=36[^] What should i do ?

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      juliogyn wrote:

      What should i do ?

      You could ask the author of the article.

      Use the best guess

      1 Reply Last reply
      0
      • J juliogyn

        Hi, i managed to paste the text in word document, but the text loses text formatting (bold, italic, center justify). I followed this article: http://www.neodynamic.com/ND/FaqsTipsTricks.aspx?tabid=66&prodid=3&sid=36[^] What should i do ?

        OriginalGriffO Offline
        OriginalGriffO Offline
        OriginalGriff
        wrote on last edited by
        #3

        Raw text does not have any formatting - it's just a string of characters. In order to paste data into Word, you can try copying it with formatting information using Clipboard.SetText with a TextDataFormat parameter: http://msdn.microsoft.com/en-us/library/tbfb3z56.aspx[^] - but if you are copying to the clipboard to transfer data, it's generally a poor idea - any app which messed with my clipboard like that woudl be uninstalled post haste. There are generally better ways to transfer data between apps, including into word, depending on exactly what you are trying to achieve.

        This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

        "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
        "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

        J 2 Replies Last reply
        0
        • OriginalGriffO OriginalGriff

          Raw text does not have any formatting - it's just a string of characters. In order to paste data into Word, you can try copying it with formatting information using Clipboard.SetText with a TextDataFormat parameter: http://msdn.microsoft.com/en-us/library/tbfb3z56.aspx[^] - but if you are copying to the clipboard to transfer data, it's generally a poor idea - any app which messed with my clipboard like that woudl be uninstalled post haste. There are generally better ways to transfer data between apps, including into word, depending on exactly what you are trying to achieve.

          This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

          J Offline
          J Offline
          juliogyn
          wrote on last edited by
          #4

          I'm trying copy the text in richtextbox and Image for Word document.

          OriginalGriffO 1 Reply Last reply
          0
          • J juliogyn

            I'm trying copy the text in richtextbox and Image for Word document.

            OriginalGriffO Offline
            OriginalGriffO Offline
            OriginalGriff
            wrote on last edited by
            #5

            How are you doing it?

            This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

            "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
            "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

            1 Reply Last reply
            0
            • OriginalGriffO OriginalGriff

              Raw text does not have any formatting - it's just a string of characters. In order to paste data into Word, you can try copying it with formatting information using Clipboard.SetText with a TextDataFormat parameter: http://msdn.microsoft.com/en-us/library/tbfb3z56.aspx[^] - but if you are copying to the clipboard to transfer data, it's generally a poor idea - any app which messed with my clipboard like that woudl be uninstalled post haste. There are generally better ways to transfer data between apps, including into word, depending on exactly what you are trying to achieve.

              This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

              J Offline
              J Offline
              juliogyn
              wrote on last edited by
              #6

              what you suggest, to create the word document while retaining the formatting? I have one Image componente and one Richtextbox.

              OriginalGriffO 1 Reply Last reply
              0
              • J juliogyn

                what you suggest, to create the word document while retaining the formatting? I have one Image componente and one Richtextbox.

                OriginalGriffO Offline
                OriginalGriffO Offline
                OriginalGriff
                wrote on last edited by
                #7

                I did ask how you are doing it at the moment...

                This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

                "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
                "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

                J 1 Reply Last reply
                0
                • OriginalGriffO OriginalGriff

                  I did ask how you are doing it at the moment...

                  This message is manufactured from fully recyclable noughts and ones. To recycle this message, please separate into two tidy piles, and take them to your nearest local recycling centre. Please note that in some areas noughts are always replaced with zeros by law, and many facilities cannot recycle zeroes - in this case, please bury them in your back garden and water frequently.

                  J Offline
                  J Offline
                  juliogyn
                  wrote on last edited by
                  #8

                  I resolved problem using richtextbox.Copy and range.Paste(); :) tnks for help

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups