Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Matlab Code into Microsoft Word

815 views
Skip to first unread message

Ben

unread,
Sep 20, 2004, 11:45:34 PM9/20/04
to
Hello all,

Does anybody know if there is a way to copy matlab code from a .m file
and paste it into Microsoft Word so that it stays "pretty" (i.e. the
comments still appear in green and the strings are still maroon)?

Thank you very much,
Ben

Yang

unread,
Sep 21, 2004, 12:02:58 AM9/21/04
to
bwi...@gmail.com (Ben) wrote in news:dae9916a.0409201945.3fe9f1a1
@posting.google.com:

1.use SciTE to export the code to RTF file.

2.export the code to html file,then open it with your browser,then copy
and paste to word,the color is still there.

David Francis

unread,
Sep 21, 2004, 12:08:04 AM9/21/04
to
Ben wrote:
>
SNIP> syntax highlighting in Word

Try this word macro:

<http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3060&objectType=FILE>

Fabio

unread,
Sep 21, 2004, 6:09:31 AM9/21/04
to
Ben wrote:
>
> Hello all,
>
> Does anybody know if there is a way to copy matlab code from a .m
> file
> and paste it into Microsoft Word so that it stays "pretty" (i.e.
> the
> comments still appear in green and the strings are still maroon)?

<highlight> contribution in MatlabCentral allows you to export
M-files in coloured RTF files that can be opened into Microsoft Word.

<http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=3791&objectType=file>

Christina Ahrens

unread,
Sep 21, 2004, 11:39:33 AM9/21/04
to
This feature (RTF-formatted text from copy operation) will be supported in a
future release.

Christina Ahrens
The MathWorks, Inc.

"Fabio" <fabio....@gmail.com> wrote in message
news:eeea...@webx.raydaftYaTP...

0 new messages