Copy text from Word document and paste into Clipboard - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Copy text from Word document and paste into Clipboard

jfbakkerjfbakker Posts: 1Member
Dear collegues,

I am having difficulties in having a Delphi application do the following:

1. Open a Word document,
2. Select automatically all its content,
3. Copy this content and paste it into let's say a TMemo component.

I have found out how to do the first two steps, it is the third one that keeps on producing me headaches.

Is there anybody who can help me?

Best regards,
FRANS BAKKER


Comments

  • zibadianzibadian Posts: 6,349Member
    : Dear collegues,
    :
    : I am having difficulties in having a Delphi application do the following:
    :
    : 1. Open a Word document,
    : 2. Select automatically all its content,
    : 3. Copy this content and paste it into let's say a TMemo component.
    :
    : I have found out how to do the first two steps, it is the third one that keeps on producing me headaches.
    :
    : Is there anybody who can help me?
    :
    : Best regards,
    : FRANS BAKKER
    :
    :
    :
    The TMemo component has a PasteFromClipboard method. That should be able to paste the text into the memo.
  • sziszi81sziszi81 Posts: 80Member
    : : Dear collegues,
    : :
    : : I am having difficulties in having a Delphi application do the following:
    : :
    : : 1. Open a Word document,
    : : 2. Select automatically all its content,
    : : 3. Copy this content and paste it into let's say a TMemo component.
    : :
    : : I have found out how to do the first two steps, it is the third one that keeps on producing me headaches.
    : :
    : : Is there anybody who can help me?
    : :
    : : Best regards,
    : : FRANS BAKKER
    : :
    : :
    : :
    : The TMemo component has a PasteFromClipboard method. That should be able to paste the text into the memo.
    :


    Maybe the TRichEdit component is a better choice, since that can handle text formatting as well.

  • zibadianzibadian Posts: 6,349Member
    : : : Dear collegues,
    : : :
    : : : I am having difficulties in having a Delphi application do the following:
    : : :
    : : : 1. Open a Word document,
    : : : 2. Select automatically all its content,
    : : : 3. Copy this content and paste it into let's say a TMemo component.
    : : :
    : : : I have found out how to do the first two steps, it is the third one that keeps on producing me headaches.
    : : :
    : : : Is there anybody who can help me?
    : : :
    : : : Best regards,
    : : : FRANS BAKKER
    : : :
    : : :
    : : :
    : : The TMemo component has a PasteFromClipboard method. That should be able to paste the text into the memo.
    : :
    :
    :
    : Maybe the TRichEdit component is a better choice, since that can handle text formatting as well.
    :
    :
    Unless of course you want to strip the formatting from a large number of Word documents. Then the TMemo is excellent.
Sign In or Register to comment.