Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Appending contents of clipboard to a selected cell range
Greetings. I maintain a large group of spreadsheets that require the
same text to be appended to the contents of various cells. These cell ranges are not known in advance. I'm looking for a macro that does this: * Appends the content of the clipboard (including font format) to each cell in a range. This range of cells is not hardcoded within the macro. So far I have not been able to find a macro that does such a thing, or even the information necessary to code it. Any advice appreciated. Thanks. -- Poster |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Appending contents of clipboard to a selected cell range
If you want to do Rich Text formatting, I believe the easiest would be to
paste the clipboard to a cell, then have your macro capture the text and formatting in that cell and reproduce it character by character in your target cells using the characters collection. Turn on the macro recorder and rich text format an existing string, then turn off the macro recorder. This will give you a good example of using the characters collection. -- Regards, Tom Ogilvy "Poster" wrote: Greetings. I maintain a large group of spreadsheets that require the same text to be appended to the contents of various cells. These cell ranges are not known in advance. I'm looking for a macro that does this: * Appends the content of the clipboard (including font format) to each cell in a range. This range of cells is not hardcoded within the macro. So far I have not been able to find a macro that does such a thing, or even the information necessary to code it. Any advice appreciated. Thanks. -- Poster |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Appending contents of clipboard to a selected cell range
Inherent VBA access to the clipboard is limited to the DataObject. But
according to help "The DataObject currently supports only text formats." This is in XL XP, so not sure if the "currently" still applies in later versions. If so, and you need the formatting, then go Tom's way. Otherwise use the DataObject. NickHK "Poster" wrote in message oups.com... Greetings. I maintain a large group of spreadsheets that require the same text to be appended to the contents of various cells. These cell ranges are not known in advance. I'm looking for a macro that does this: * Appends the content of the clipboard (including font format) to each cell in a range. This range of cells is not hardcoded within the macro. So far I have not been able to find a macro that does such a thing, or even the information necessary to code it. Any advice appreciated. Thanks. -- Poster |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro to transfer contents of 'Selected' cell to alternate cell. | Excel Worksheet Functions | |||
Rename selected (highlighted) sheet with cell contents of sheets in cell A1 | Excel Programming | |||
Clear Contents of a Selected Range | Excel Programming | |||
Copy outside Clipboard contents (html page) to a cell in Excel | Excel Programming | |||
Copy outside Clipboard contents (html page) to a cell in Excel | Excel Programming |