TheSwamp

CAD Forums => CAD General => Topic started by: Willie on September 04, 2007, 09:49:14 AM

Title: Paste without Formating
Post by: Willie on September 04, 2007, 09:49:14 AM
Is there a way to paste text, copied in Excel or Word, without any formating into and Mtext object?

At the moment, I am doing it this way:

1. Copy text in Excel
2. Paste into Notepad - to remove all the formating
3. Copy the text in Notepad
4. Paste the into Mtext

I allways use CTRL+TAB and CTRL+C and CTRL+V to speed this up, but it is not fast enough.

Any suggestions?

Title: Re: Paste without Formating
Post by: deegeecees on September 04, 2007, 10:08:47 AM
You can set your default text editor to Notepad, that would eliminate a step...
Title: Re: Paste without Formating
Post by: craigr on September 04, 2007, 11:39:38 AM
At the moment, I am doing it this way:

1. Copy text in Excel
2. Paste into Notepad - to remove all the formating
3. Copy the text in Notepad
4. Paste the into Mtext

I allways use CTRL+TAB and CTRL+C and CTRL+V to speed this up, but it is not fast enough.

Any suggestions?

That's the way I do it, and I agree - it's too slow.

Sorry I don't have the answer but look forward to hearing one if it exists.
craigr
Title: Re: Paste without Formating
Post by: deegeecees on September 04, 2007, 11:47:51 AM
You can set your default text editor to Notepad, that would eliminate a step...

This way, you would do the following:

1. Copy test in Excell
2. Select/Create Mtext object
3. Paste
4. Click OK.

Done
Title: Re: Paste without Formating
Post by: Willie on September 05, 2007, 05:12:07 AM
Thanks for all the replies.

For general Mtext creation and editing, Notepad is not the first choice, but for the formatless pasting of text Notepad is the answer.

I will try to create a toggle buttun to switch between the Internal and Notepad to switch between Notepad and the Internal editor.

Thanks
Title: Re: Paste without Formating
Post by: Willie on September 05, 2007, 07:09:48 AM
My command to toggle between Notepad and the Internal editor

Code: [Select]
(defun c:TTE ()
  (setq notep "c:/windows/notepad.exe")
  (setq inter "Internal")

  (setq cur_mtexted (getvar "MTEXTED"))

  (if
    (or
      (= cur_mtexted null)
      (= cur_mtexted "Internal")
    );or

     (progn
       (setvar "MTEXTED" notep)
       (princ "\n ***************************************")
       (princ "\n *** MText editor changed to NOTEPAD ***")
       (princ "\n ***************************************")

     );progn

     (progn
       (setvar "MTEXTED" inter)
       (princ "\n ****************************************")
       (princ "\n *** MText editor changed to INTERNAL ***")
       (princ "\n ****************************************")
     );progn
    );if
  (princ)
  );defun


Thanks to deegeecees for giving me the idea

Willie
Title: Re: Paste without Formating
Post by: deegeecees on September 05, 2007, 09:58:07 AM
Looks good Willie, you're welcome.
Title: Re: Paste without Formating
Post by: Sdoman on September 14, 2007, 12:20:00 AM
I use a little utility by Steve Miller called "Pure Text".  It strips formatting from the contents of the clipboard and paste it into the current document via the hotkey Windows+V.  It's free!

http://stevemiller.net/puretext/