TheTechGuide Forum

General Category => Software => Topic started by: ghisirds on September 10, 2007, 01:00:25 PM

Title: Excel and Notepad: how avoid additional inverted commas after copy and
Post by: ghisirds on September 10, 2007, 01:00:25 PM
Hi,
If I write a multi-line text in a cell (then go down with alt+enter) and after copy the cell pasting on Notepad, it display before inverted commas and after textual content.
Instead, if I select directly the content from the formula bar, it isn't happen.
Do exist a way for copy and paste directly from the cell without select from the formula bar?
Maybe with a macro?

Thank
Marco

__________________
nuove idee regalo compleanno (http://\"http://www.idee-regalo.biz/catalogo-stereogrammi-3.html\"), servizio realizzazione siti internet (http://\"http://www.ghisirds.it/\"), forum scuole superiori (http://\"http://scuo.la/\"), assistenza pantografo (http://\"http://www.righettofabrizio.com/pantografo-taglio-plasma.html\")
Title: Excel and Notepad: how avoid additional inverted commas after copy and
Post by: guestolo on September 11, 2007, 06:45:07 PM
Have you seen this?
http://forums.techguy.org/business-applica...to-notepad.html (http://\"http://forums.techguy.org/business-applications/555745-exporting-excel-worksheet-into-notepad.html\")

Read the whole topic, lots of good advice
Title: Excel and Notepad: how avoid additional inverted commas after copy and
Post by: ghisirds on September 13, 2007, 03:11:21 AM
thanks to all!
 I solved the problem and it is work.
 
 
         Sub TestMacro()
    Dim objClip As DataObject
     '   Microsoft Forms 2.0 Object Library
     '   needs to be selected as a  Reference (on the VBA Tools menu)
    Dim strTmp As String
    Set objClip = New DataObject
    strTmp = Replace(ActiveCell.Value, Chr(10), vbCrLf)
    objClip.SetText strTmp
    objClip.PutInClipboard
    Set objClip = Nothing
End Sub

 
 best regards.