PDA

View Full Version : Formattung lost when copying/pasting into excel cell using VBa



robino
10-10-2013, 03:34 AM
Hi,I am copying some text from word into excel. It is formatted and I want to keep the formatting, but I want it all in one cell.Using Copy Past or Past special results in it populating multiple rows and in some cases multiple columns, it replicates exactly what would happen if you did it manually.Doing it manually I would press F2 and then past (or past directly into the formula bar, same thing) and this works perfectly.However I simply cannot get the same effect with VBA. If useActiveCell.FormulaR1C1 = WDrngCh.FormattedText (WBrngCh contains the text) it appears unformated in the cell (at least in a single cell though!!). Interestingly if I copy the text out of the cell (manually) and back into word or even another cell using the F2 method the formatting is back, so somehow the ctrl characters are still there, just not working......Help

snb
10-10-2013, 11:44 AM
What if you format the receiving cell as 'wrap text' before copying ?

robino
10-11-2013, 12:53 AM
Yes I tried that!! doesn't help though