Results 1 to 7 of 7
  1. #1
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Multiple 'copy' of information (ALL)

    I have a document (with 4 sections) that I need to process as follows:

    Section 1
    Section 2 (table)
    Section 3
    Section 4

    Need to do as follows:

    1. Get contents of the section 2 table (Copy & set it to range)
    2. Remove sections 1, 2 & 3 from the document (delete all section)
    3. Insert sections 1, 2 &3 from another document (copy sections from another doc & set it to a range - this overwrites the first copy)
    4. Copy the contents of the section 2 table into the new section 3 table (????) - can't do it

    So the question is: is there a way of holding multiple items in the clipboard or a range.copy object?

    Thanks.

    Robie
    Thanks.
    Robie

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple 'copy' of information (ALL)

    Do you want to do this interactively or in a macro?

  3. #3
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple 'copy' of information (ALL)

    Sorry - macro of course.

    I can do this manually no problems.
    Thanks.
    Robie

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Multiple 'copy' of information (ALL)

    Although Office has a multi-item clipboard for interactive use, there is no programmatic access to it, unfortunately. I'd do the following:
    - Create a blank new document.
    - Copy/paste the table into the new document.
    - Delete sections 1-3 from the original document.
    - Insert sections 1-3 from the other document.
    - Copy/paste the table from the new document into section 3.
    - Discard the new document (i.e. close it without saving it).

  5. #5
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple 'copy' of information (ALL)

    Thanks. Your suggestion (as always) has high merit indeed. I will give it a try. Thanks once again.
    Thanks.
    Robie

  6. #6
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: Multiple 'copy' of information (ALL)

    One way to have 'multiple' clipboards that you can interact with programatically is to use the InsertToSpike method. Spike is a temporary autotext entry which can be used to store cumulatively (you can add multiple ranges) before inserting the spike back into the document. If you used spike to do the first copy then the rest of your methodology should be OK

    Doing this via code
    'add to spike
    ActiveDocument.AttachedTemplate.AutoTextEntries.Ad d Name:=Spike, Range:=Selection.Range

    'insert spike into document
    ActiveDocument.AttachedTemplate.AutoTextEntries.It em(Spike).Insert Where:=Selection.Range, RichText:=True
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  7. #7
    4 Star Lounger
    Join Date
    Jan 2002
    Location
    London, Gtr London, England
    Posts
    416
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Multiple 'copy' of information (ALL)

    Never heard of Spike. Good one. Thanks Andrew.
    Thanks.
    Robie

Posting Permissions

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