Report generation without rptgen
2 views (last 30 days)
Hello, I'm running a program on R2012a that gives me various outputs in the form of plots and text. I need these to be documented in a report (preferably .doc or .pdf). What i need basically is that when i run the program, a word doc or pdf must open in the end, that includes all the results. It need not be saved in a pre-defined location; the user can save it anywhere he wishes to. I do not have Report Generation, so is there a code that can do this?
I do know the code to create a new word doc with some text and figures that are already stored in a folder.
% % --- Generate report.
%%Start Microsoft Word
Word_COM = actxserver('Word.Application');
set(Word_COM,'Visible',1);%Make Word visible
% Create a document
File_COM = Word_COM.Documents.Add;%Creates a new document
% Add some text
I am able to save the plots into a folder, but when i try to import them into the word doc, they appear just as a box which says "Image can't be displayed". Maybe this is because they get saved in the standard matlab .fig format. However, even if i can get the plots right, i cannot enable the code to import text, unless i myself type it within those quotes (Word_COM.Selection.TypeText('*Test*');), which is not what i want!
Anyways, if someone knows how it can be done, i would be grateful!