Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Kehkashan Malik   on Jan 09 In MS Office Category.

  
Question Answered By: Laaibah Malik   on Jan 09

I did the following 3 tests:

(1) the following will copy  with carriage  return and verified in
msgbox:
Dim x As New DataObject

Range("a10").Select
Selection.Copy

x.GetFromClipboard
z = x.GetText
MsgBox ("..." & z & "...")

(2) the following will copy with no carriage return  and verified in
msgbox:

Dim x As New DataObject
Dim y As New DataObject

x.SetText "aaaaaa"
x.PutInClipboard

y.GetFromClipboard
z = y.GetText
MsgBox ("..." & z & "...")

(3) the following will copy with no carriage return and verified in
msgbox:
Dim x As New DataObject
Dim y As New DataObject'

x.SetText ActiveCell.Text
x.PutInClipboard

y.GetFromClipboard
z = y.GetText
z = "" & z & ""
MsgBox ("..." & z & "...")

====> The above test #3 is near the final answer for me, except that
I can paste  the clipboard to any text editor in test #2, but not in
test #3...

Share: 

 

This Question has 2 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Copy without Carriage Return Or get search suggestion and latest updates.


Tagged: