#1
|
|||
|
|||
Copy Paste each cell to a new page
Hi
I have a 1Col x 1430Row table in excel. I want to copy and paste every cell as a new page in a Word document (Landscape orientation) while retaining the color formatting. If importing from excel is an issue, I can copy paste the table in word and then use your suggested code from there. Kindly assist. |
#2
|
|||
|
|||
One possible approach would be to copy/paste the spreadsheet content into Word as plain text (paste special) and then apply a style with 'start on new page' (format > paragraph > line and page breaks > page break before; include the required colour formatting in the style, too.
For more flexibility, though, I'd start by adding two things to the spreadsheet: a column before the data, and an empty row between each row with content. Why? then you can add tags (for example, the colour name before a cell with coloured content and an arbitrary [empty] tag before each empty cell. Paste special these two columns into Word, set up any coloured content styles you need (with the "break before" property) plus a plain-text style with no break before, then use search/replace on the tags to apply the styles as required. There may, of course, be other approaches! |
#3
|
|||
|
|||
I will try these now and let you know.
|
#4
|
|||
|
|||
A sample content of a cell of my table in excel is below.
Be kind; because everyone you meet, is facing some kind of a battle I used a macro to remove the punctuation and color words so now this cell looks like this. Be kind because everyone you meet is facing some kind of a battle I believe I wasn't clear enough in my post in explaining my color scheme. So I have my table in excel in both formats: 1. with punctuation 2. with color scheme and no punctuation. If importing from the 'table with color scheme' is hard, if there is an approach that would would import each cell of from the 'table with punctuation' I can try and find a macro in word to get my color scheme. Would the approaches you suggest work now? Please suggest. And, if you can't think of a way, Can you please reword my original post + this post combined so my question is clearer in a single post? Last edited by Singh_Edm; 01-16-2014 at 03:36 AM. Reason: Put a reword request |
#5
|
|||
|
|||
Revised now I understand the colouring is at character level, not cell level …
set up character styles and use those to apply your special colouring: this will make it easier to find/retrieve coloured words, and to add new records by hand if you need toHTH! |
#6
|
|||
|
|||
Regarding bullet point 4, I don't understand "applie a heading style 'WITH PAGE BREAK BEFORE'? So as you are rewording my question you are also suggesting I try this, right?
I'm not sure how to apply a 'page break before' Many thanks for taking out the time for that. |
#7
|
|||
|
|||
|
#8
|
|||
|
|||
Ok so I was able to put page breaks. I thought the wildcard idea would work but it didn't. So now I have a word file, without colors but with punctuation marks ; , .
I want to differently color each word that ends with the above symbols. Can't get this portion done. Last edited by Singh_Edm; 01-17-2014 at 02:27 AM. Reason: Partially solved issue. Accidentally acknowledged that it was fully solved. |
#9
|
|||
|
|||
You'll have to hope that someone else can help you with Word's implementation of wildcards :-} It doesn't seem to include the concept "word", or at any rate I can't persuade it to find/select {word};
btw, when you're at the stage with colours (imported from the original Excel file) but no special characters – have you tried searching for colour and applying a style? I'll watch and learn on this part of the question. |
#10
|
|||
|
|||
If I import the colored excel file (no special characters) and paste that as plain text, as per your question, can I still search for colors to apply a style? Because once I paste as text to apply 'page break before' everything is pasted just as black text.
|
#11
|
|||
|
|||
When you paste as plain text, the color formatting will be lost.
|
#12
|
|||
|
|||
Issue Resolved
http://www.vbaexpress.com/forum/show...ecial-characer
The second problem is Solved there by someone. |
#13
|
|||
|
|||
This option does not use paste special, so the Excel colours are still there and you can use them to drive search/replace.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Paste Special: Copy and Paste Formatting Only? | tinfanide | Word | 6 | 03-06-2013 12:21 AM |
Copy and paste words on right side of page | Videolife | Word | 3 | 01-26-2013 12:54 PM |
Can't copy paste | irenasobolewska | Office | 2 | 10-26-2012 05:09 PM |
Find, copy and paste into a new page | jperez84 | Word VBA | 24 | 09-20-2012 11:34 AM |
Copy - Paste between 2 tables | rod147 | Excel | 1 | 10-22-2009 08:21 PM |