Consulting

Results 1 to 2 of 2

Thread: Copying text with a click of a button

  1. #1
    VBAX Newbie
    Joined
    May 2014
    Posts
    1
    Location

    Copying text with a click of a button

    Hi all. I am after some help copying text.

    Basically I hava a form as below...

    INTRO
    This is the top section and does NOT require to be copied.

    MAIN
    This is the main section that I want to be copied.

    It will be form field text boxes so people can type in the answers in this bit.

    It will also have form protection on so noone can alter the fields other then enter data into the text boxes.

    END
    The is will be a couple of paragraphs long and will also NOT require copying.

    ---------------------
    | COPY BUTTON |
    ---------------------


    As described above, when the button at the bottom of the word document is clicked, all of the information in the MAIN section will be copied to the clipboard and the INTRO and END ignored.

    I basically need help with how to make the following process happen.
    click button > unprotect document > select data from within the INTRO section > copy the data to clipboard > re-protect document.

    I have tried making bookmarks before and after the intro but cannot get my head around it.

    Any help will be greatly appreciated.

    Thanks in advance, Steve.

  2. #2
    Knowledge Base Approver VBAX Guru macropod's Avatar
    Joined
    Jul 2008
    Posts
    4,435
    Location
    If you use Section breaks to delineate your 'main' section, you can copy the section, via it's index #, without the need for bookmarks. And, if you use content controls instead of formfields, you don't need forms protection - you can use either no protection or 'Read Only' editing restrictions with the editable portions marked as exceptions. Either way, with content controls you don't need to unprotect the document.
    Cheers
    Paul Edstein
    [Fmr MS MVP - Word]

Tags for this Thread

Posting Permissions

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