Author Topic: Excel and Notepad: how avoid additional inverted commas after copy and  (Read 583 times)

Offline ghisirds

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
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, servizio realizzazione siti internet, forum scuole superiori, assistenza pantografo

Offline guestolo

  • Site Donator
  • Administrator
  • Hero Member
  • *****
  • Posts: 16034
  • Karma: +1/-0
    • View Profile
    • http://
Excel and Notepad: how avoid additional inverted commas after copy and
« Reply #1 on: September 11, 2007, 06:45:07 PM »
Have you seen this?
http://forums.techguy.org/business-applica...to-notepad.html

Read the whole topic, lots of good advice

Do you want to post your own logs from FRST?

Follow the instructions posted http://www.thetechguide.com/forum/index.php/topic/22942-please-read-how-to-post-logs-from-frst/\'>Click Here


Offline ghisirds

  • Newbie
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Excel and Notepad: how avoid additional inverted commas after copy and
« Reply #2 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.