Copying syntax highlighted code to Word/Outlook/Browser?

Copying syntax highlighted code to Word/Outlook/Browser?

2
NewbieNewbie
2

    Aug 27, 2004#1

    Is there a way to get UltraEdits syntax highlighting into a Word document?

    Thanks.

    Edit: Copying syntax highlighted code in HTML or RTF is available since UE v19.00 released on 2013-03-07.

    See also the power tip Copy and paste syntax highlighting as RTF or HTML - how to copy source code as HTML or RTF and preserve the code highlighting.

    58
    Advanced UserAdvanced User
    58

      Sep 13, 2004#2

      If you absolutely need such a feature, I suggest you look at some printer and pseudo-printer drivers. After all, UEdit can _print_ the syntax highlighting. E.g., you could use the driver of a Postscript printer and print to file. Of course, that still wouldn't be usable in Word, but there might be similar options or a converter program (ps2rtf?).

      Manni

      2
      NewbieNewbie
      2

        Feb 10, 2005#3

        Is this found in any of the new features of recent UE versions? If not, is it even planned?

        12
        Basic UserBasic User
        12

          Feb 16, 2005#4

          You can use Acrobat Writer to create PDF file.
          But you can find many free software : CutePDF, PDF995, PDF4free...

          You can also use as "pbleyer" the ghostscript and Redmon tools.
          There were many tutorials for install and use them in the web:
          http://kenchiro.tripod.com/howtoPDF.html
          http://sebsauvage.net/pdf/pdfgratuit.pdf in french
          http://www.tutoriels.com/imprimer.php?type=1&id=20 in french
          http://www.stat.tamu.edu/~henrik/GSPSpr ... inter.html
          http://www.cs.wisc.edu/~ghost/
          Regards from France
          Kenavo from Brittany

          1

            May 11, 2005#5

            Hi all!
            I love this syntax highlighting of UE, and it would be great e.g. for documentation purposes to be able to keep the colours when copying text passages from UE to Word or any other program.
            In the VIM editor you can save highlighted text as HTML and insert that to Word, which would be fine as well.

            :?: Has anyone an idea how to bring the coloured syntax to any HTML-able program?
            Any other than doing screenshots, and more comfortable than printing to file as PS, converting to PDF and copying the text to Word...

            6,687587
            Grand MasterGrand Master
            6,687587

              May 22, 2005#6

              Not really. The best method at the moment is to use a printer driver, which can ouput RTF or XPS files, for example:

              LEADTOOLS ePrint printer driver
              Microsoft XPS Document Writer

              1
              NewbieNewbie
              1

                May 19, 2006#7

                To print UltraEdit code to a PDF in color, try CutePDF (http://www.cutepdf.com). It is free.

                14
                Basic UserBasic User
                14

                  Jan 08, 2008#8

                  Absolutely agree with this suggested feature. I've been wanting this for a while. The suggested workarounds are waaaay too cumbersome.

                  4
                  NewbieNewbie
                  4

                    Dec 05, 2008#9

                    I agree to - I would also love to see this feature in UltraEdit. This would so convenient to be able to export the code to HTML and paste it in my blog. And it doesn't seem to be very difficult to implement since all the coloring information is already there.

                    1
                    NewbieNewbie
                    1

                      Jun 11, 2010#10

                      For those still interested in other alternatives, here's another method:

                      The Notepad++ text editor has a built-in plugin called 'NppExport' that lets you copy the RTF/HTML formatting and paste into Word (or whatever else), thereby preserving the syntax highlighting. Having to use NP++ for this could be a pain if you're using Ultraedit full-time, but might be of some use if you only have to do this every once in awhile.

                      I just recently upgraded to UE v16... I hadn't done so since v11; I was hoping IDM would've added this feature by now, but alas... it seems that they haven't. What's the best way for paying customers to petition IDM directly to get this feature added? If freeware text editors can do this, UE should too. Based on other posts in this thread, I'm obviously not the only one who thinks this way :)

                      17
                      Basic UserBasic User
                      17

                        Dec 12, 2012#11

                        Mofi wrote:Not really. The best method at the moment is to use a printer driver, which can ouput RTF or XPS files, for example:

                        LEADTOOLS ePrint printer driver
                        Microsoft XPS Document Writer
                        Thanks.

                        The second alternative seems to be the best method for me at this stage as I already have an XPS virtual printer on my machine, still a little bit cumbersome though.

                        Hope this feature will be added as soon as possible.
                        Laurent wrote:I agree to - I would also love to see this feature in UltraEdit. This would so convenient to be able to export the code to HTML and paste it in my blog. And it doesn't seem to be very difficult to implement since all the coloring information is already there.
                        Absolutely right, IMO.

                        In my opinion, it is utterly strange that such a straightforward and intuitive and widely-wanted and not-hard-to-implement feature does not exist - not only in UE but also, seemingly, in many other (non-trivial) editor apps with syntax highlighting.

                        6,687587
                        Grand MasterGrand Master
                        6,687587

                          Mar 09, 2013#12

                          IDM released UltraEdit v19.00 on 2013-03-07 and UEStudio v13.00 on 2013-05-01 which support copying syntax highlighted code with formatting tags in HTML and RTF format.

                          The commands are in menu Edit in submenu Copy Special. There are 3 commands:
                          1. Copy as HTML Document
                            UltraEdit / UEStudio creates for the entire file or just the selected block a complete HTML file which is copied to the clipboard. The HTML file can be pasted into a new file and saved as HTML file or pasted into other applications supporting HTML format like OpenOffice Writer, Microsoft Word, MS Outlook, etc.
                          2. Copy as HTML
                            UltraEdit / UEStudio creates for the entire file or just the selected block a preformatted HTML block with appropriate formatting tags which is copied to the clipboard. The HTML formatted block can be pasted into other applications supporting HTML format like MS Word, MS Outlook, etc. or into a new text file within UltraEdit. And with using a custom UltraEdit script which modifies the HTML formatted block in the clipboard to a block with BBCode tags, tags in Wiki syntax, or whatever other format is needed, the syntax highlighted code can be quite easily converted now to any format.
                          3. Copy as RTF
                            UltraEdit / UEStudio creates for the entire file or just the selected block an RTF formatted block (respectively file) which is copied to the clipboard. The RTF formatted block can be pasted now into other applications supporting RTF format.

                          2
                          NewbieNewbie
                          2

                            Mar 10, 2013#13

                            Hi all!, I have the 19.00.0.1022 version and at Edit menu don't appears the copy special item.

                            Why?

                            Thanks

                            6,687587
                            Grand MasterGrand Master
                            6,687587

                              Mar 11, 2013#14

                              You have either denied the update of the menu profiles of the 7 standard environments on first start of UltraEdit after the upgrade or you use a custom environment with a custom profile which of course is not updated by UltraEdit.

                              In first case right click on a free area of the menu, left click on Manage Menu Configurations and use button Reset All.

                              In second case right click on a free area of the menu, left click on Customize Menu and add the 3 new commands to whatever menu you want. You might switch to a standard environment first, for example the Programmer environment, and look on the menu there before you customize the menu of your environment. View - Environments can be used to switch the environment, or the Select Environment command in the main toolbar if you have not removed this command from the toolbar(s) of your custom environment.

                              2
                              NewbieNewbie
                              2

                                Mar 21, 2013#15

                                Thanks!!!!

                                It worked.