Re: Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard.
From: Peter Hewett (nospam_at_xtra.co.nz)
Date: 09/05/04
- Next message: Jay Freedman: "Re: Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- Previous message: Philip: "Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- In reply to: Philip: "Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- Next in thread: Jay Freedman: "Re: Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 06 Sep 2004 01:19:17 +1200
Hi Philip
I'm afraid you're out of luck. Although you can copy ann paste multiple pieces of data
within Office applications you can't do it either from another application or
programmatically from within Office. There are in fact two clipboards the general one
shared by all applications which holds just one piece of data and a clipboard private to
the Office applications which can hold multiple items of data. Unfortunately Microsoft
did not bother to expose an API for the Office clipboard so you can't use it from VBA
etc..
You will need to restructure your requirements to do two cut/copy and pastes.
You can find help on working with the clipboard here:
Manipulating the clipboard using VBA
http://word.mvps.org/faqs/macrosvba/ManipulateClipboard.htm
Of you still need help after reading this article post again.
HTH + Cheers - Peter
"Philip" <finton@ihug.co.nz>, said:
>I copy two pices of text from another program and need some VBA way of
>1 pasting them into Word in the order copied, then clearing the
>Clipboard,
>2 adding various other stuff below the pastes (have macro for this),
>3 manually entering three bits of text in separate positions in the table
>formed by (2),
>4 format the text, and print the page (have another macro for this).
>
>What I'd like to do is combine the lot into one macro. I think I know how to
>do (3) [but suggestions welcome!], but how do I do (1)??? It is not
>something I can macro record.
>The pastes contain different info but are always the same number of lines
>and the manually typed stuff varies but is always in the same places.
>
>Philip
>
>
>
- Next message: Jay Freedman: "Re: Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- Previous message: Philip: "Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- In reply to: Philip: "Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- Next in thread: Jay Freedman: "Re: Clipboard: pasting last two (or all) items from Word clipboard and clearing clipboard."
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|