I am using MATLAB to paste and caption plots into Microsoft Word. I would like to also crop these images using the ActiveX control.
something like:
Consider this example:
%# create plot and copy to clipboard
plot(rand(10,1))
print -dmeta
%# open MS-Word
Word = actxserver('Word.Application');
Word.Visible = true;
%# create new document
doc = Word.Documents.Add;
%# paste figure from clipboard
Word.Selection.Paste
%# crop the image
doc.InlineShapes.Item(1).PictureFormat.CropBottom = 100;
%# save document, then close
doc.SaveAs2( fullfile(pwd,'file.docx') )
doc.Close(false)
%# quit and cleanup
Word.Quit
Word.delete