Copy unformatted value of cell via macro

B

blomberg87

I have created an Excel Sheet with a text generator, based upon certain circumstances.

The text generated is based on parameters, and is gathered into paragraphs of text in a single cell, using the CONCATENATE function.

If I copy the finished contents of the cell into a HTML based editor, such as an e-mail - It copies the formatting and a table (TD).

Is there a way, to copy the text (values only) into clipboard?

I have found solutions to paste it unformatted into a cell in Excel, using the following Visual Basic Code:

"
Sub Copy()

Sheet1.Range("GeneratedText").Copy
Sheet2.Cells(1, 1).PasteSpecial xlPasteValues
Sheet2.Cells(1, 1).Copy
"

End Sub
This copies and pastes the text unformatted to the new Cell within Excel - But I wish to paste it elsewhere, and therefor having it stores without formatting in the Clipboard.

I have found one way to do it, using DataObject to a variable, which has a function to put data in the clipboard. In order for that to function you need to add a Reference (Microsoft Forms 2.0 Object Library) which I cannot find in the Mac-version of Excel. Any ideas?

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top