I want to use a Basic macro to copy the cell's text to a Text document and retain this internal formatting.
Doing it manually, copy and paste creates a Calc object cell in the Text document (I can replicate this with Basic) but what I really want is the equivalent of Paste Special using RTF because this doesn't create the Calc object and puts the text neatly into the document. Unfortunately PasteSpecial doesn't work in Basic - it always pops up a dialogue asking for a format selection - I've seen this discussed in the forums but no one has found a solution to bypass this dialogue.
I can copy the text directly using (oDoc points to an empty Text document; oCell points to a single cell in the spreadsheet):
Code: Select all
oCursor = oDoc.Text.createTextCursor()
oCursor.String = oCell.String
Any help gratefully received - thanks.