Path: news.mathworks.com!not-for-mail
From: "Dan Haeg" <haegd@msoe.edu>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Automated figure copy-paste to Microsoft Word?
Date: Fri, 29 Aug 2008 18:42:01 +0000 (UTC)
Organization: Milwaukee School of Engineering
Lines: 30
Message-ID: <g99ftp$foo$1@fred.mathworks.com>
References: <g8v78u$ml5$1@fred.mathworks.com> <g8v7nu$s79$1@fred.mathworks.com> <g8v9t9$pj0$1@fred.mathworks.com>
Reply-To: "Dan Haeg" <haegd@msoe.edu>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1220035321 16152 172.30.248.35 (29 Aug 2008 18:42:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 29 Aug 2008 18:42:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 475291
Xref: news.mathworks.com comp.soft-sys.matlab:487899



> > > 
> > > I would like to have a way where MATLAB figures are
> > > automatically pasted to a Word document. Anyone know
how to
> > > go about this?
> > > 
> > > Thanks,
> > 
> > One way would be to publish the script that created the
> > figures, see the help for options.
> 
> Thanks for the suggestion, but I'm afraid I don't exactly
> follow what you mean. Could you clarify a bit more please?

if you have a bunch of figures open in matlab you can make a
script that loops through all of the figures and changes
something. if you "publish" this script matlab will make a
word document with all of your figures.

save the below code as a script:
%% make available figures active
h=findobj('type','figure');
for ind=1:length(h)
    figure(h(ind))
    grid on
end

run this from the commandline:
publish('your script name goes here','doc')
winopen(ans)