Author |
Topic |
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Mar 17 2004 : 10:42:13 AM
|
Since I use a black background, I never use "Copy to Clipboard in RTF". I just tried to disable that feature, which somehow has been mysteriously enabled, and darned if I can find where that checkbox is... anybody else see it?
|
|
Dean Ashton
Ketchup Master
60 Posts |
Posted - Mar 17 2004 : 10:51:49 AM
|
I can't find it, but if you come across it in your travels, let us all know.. :)
It's really annoying copying code from VS.NET to put into an email, only to find the email ends up preserving the font/colours.
Cheers, Dean
|
|
|
Cezariusz
Tomato Guru
Poland
244 Posts |
Posted - Mar 17 2004 : 10:58:24 AM
|
As far as I can remember, for .NET it's a feature of the IDE itself. Actually it's HTML not RTF. "Copy RTF to the clipboard" option is available only when running VC++ 6.0. So look for the option in VS.Net. |
Cezariusz Marek https://midicat.net/ |
|
|
support
Whole Tomato Software
5566 Posts |
|
LarryLeonard
Tomato Guru
USA
1041 Posts |
Posted - Mar 17 2004 : 1:13:45 PM
|
I google'd this gem from UseNet: quote: From: Visual Studio Core Team \\(MS\\) ([email protected]) Subject: Re: Disabling Rich Text Format when copying code to the clipboard in VS.Net Newsgroups: microsoft.public.vsnet.general, microsoft.public.vsnet.ide Date: 2002-09-13 15:05:28 PST
Carlos, There's no way to paste just the plain text right now.
We know this is a problem and we've entered this a feature request for a future release.
Thanks, Alec Ramsay Visual Studio Core Team -- This posting is provided "AS IS" with no warranties, and confers no rights.
So you can do RTF, but not plain text?? Reminds me of this Monty Python bit:quote: MOUSEBENDER: Ah, how about Cheddar?
WENSLEYDALE: Well, we don't get much call for it around here, sir.
MOUSEBENDER: Not much ca- It's the single most popular cheese in the world!
Sigh...
|
|
|
kschaab
Tomato Guru
USA
118 Posts |
Posted - Mar 17 2004 : 2:50:57 PM
|
OK Merry Christmas! Here's a macro to do it, don't pick on me I don't jack about VB and less about VB.NET
you will need this:
Imports System.Windows.Forms
Imports System.Threading
and this:
Sub MyCopy()
Dim plainCopyThreadObject As PlainCopy
Dim plainCopyThread As System.Threading.Thread
plainCopyThreadObject = New PlainCopy
plainCopyThreadObject.Selection = DTE.ActiveDocument.Selection.Text()
plainCopyThread = New System.Threading.Thread(AddressOf plainCopyThreadObject.PlainCopyMethod)
plainCopyThread.Start()
plainCopyThread.Join()
End Sub
Class PlainCopy
<STAThread()> Sub PlainCopyMethod()
Try
Clipboard.SetDataObject(Me.copySelection, True)
Catch ex As Exception
End Try
End Sub
Public Property Selection() As String
Get
Selection = Me.copySelection
End Get
Set(ByVal Value As String)
Me.copySelection = Value
End Set
End Property
Private copySelection As String
End Class
|
Edited by - kschaab on Mar 17 2004 2:52:29 PM |
|
|
kschaab
Tomato Guru
USA
118 Posts |
Posted - Mar 17 2004 : 3:50:10 PM
|
Oh and BTW paste special also works, but I figured you wanted a less painful way to do things. Also this does not seem to work with the paste menu in VS. I'm sure there is a way to work around that problem in VS by copying to a new text document or something but probably just easier (and less painful) to use two hotkeys. |
|
|
|
Topic |
|