Rank: 206 based on 424 downloads (last 30 days) and 20 files submitted
photo

Ivar Eskerud Smith

E-mail

Personal Profile:

Researcher

Professional Interests:

 

Watch this Author's files

 

Files Posted by Ivar View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 Oct 2013 joinCellString Join a cellstring into a character string by specified delimiter. Author: Ivar Eskerud Smith join, cellstring, delimiter 13 1
  • 4.0
4.0 | 1 rating
04 Feb 2013 Hampel filter in C++ Detect and replace outliers in a signal. Author: Ivar Eskerud Smith hampel, outlier, median, filter 19 0
17 Jan 2013 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith ms, word, office, microsoft, activex, i will have to see if... 82 22
  • 4.5
4.5 | 4 ratings
16 Oct 2012 addScrollbar Add a scrollbar to scroll the x- or y-axis on one or more axes in a figure. Author: Ivar Eskerud Smith scroll, scrollbar, axis, limits, ui, control 17 0
18 Jun 2012 Order of magnitude of number Returns the order of magnitude of one or more numbers. Author: Ivar Eskerud Smith order, magnitude, order of magnitude 35 6
  • 5.0
5.0 | 5 ratings
Comments and Ratings by Ivar View all
Updated File Comments Rating
14 May 2014 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith

ashkaan, the scalePicture function takes a handle to a picture as input, for instance returned from the insertPicture function. If you see inside the insertPicture function you can see an example.

02 Mar 2013 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith

Ian Philips: I do not understand why you get that error with the saveAs function, are you sure the word document was not closed before calling that function? Then the wordHandle in the object will be invalid. The insertTable function takes a cell array as input, which can contain both string and numbers. If I get the time I might try to add some more documentation and examples

16 Jan 2013 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith

I will have to see if I can reproduce the error. Have you moved any files, for instance the Word.m file out of the @Word folder?

05 Sep 2012 Figure Management Utilities These M-files are a collection of utilities for managing groups of figures on multiple monitors. Author: Mirko Hrovat

03 Aug 2012 Java-based data table Spreadsheet display/editing/sorting of data with multiple features Author: Yair Altman

Is it possible to register a callback to detect clicks/when the user selects a row?

Comments and Ratings on Ivar's Files View all
Updated File Comment by Comments Rating
26 Jun 2014 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith Harris, Micky

One more question. I don't see a saveAs in the Word/@Word folder. Is this a missing file? I have the save function but not save as.

26 Jun 2014 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith Harris, Micky

Does anyone have a simple example of how to create a report with Table of contents, a figure, a table, headings and text? Also how to change page layout to landscape would be really nice too.

14 May 2014 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith Eskerud Smith, Ivar

ashkaan, the scalePicture function takes a handle to a picture as input, for instance returned from the insertPicture function. If you see inside the insertPicture function you can see an example.

13 May 2014 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith ashkaan

Does anyone know how to use scalePicture function ?

12 Nov 2013 Control MS Word from matlab A set of functions that can control word from matlab by activex. Author: Ivar Eskerud Smith Gregory

Thank you very much for this tool!

Some comments from my side:
1. Function scaleAllImages, line 163-164:
There is no need in specifying both ScaleHeight and ScaleWidth. Indeed, the aspect ratio should be hold, so I replaced these lines with

set(shapes.Item(i),'LockAspectRatio','MsoTrue');
set(shapes.Item(i),'ScaleHeight',factor);

2. If somebody wants to insert Matlab figs into the MS word documents as is (as they are presented at the screen), the following code should be helpful, I think:

%additional arguments specified to avoid opening the figure that is already opened
fig = openfig(file,'reuse','invisible');
%to set the figure size in the word document to be the same as on the screen
set(gcf,'PaperPositionMode','auto');
%copy figure to clipboard as windows EMF
print(fig,'-dmeta');
actxWord.Application.Selection.Paste();
close(fig);

I've placed this code to the insertPicture function instead of the line 413:
actxWord.Application.Selection.InlineShapes.AddPicture( file, link, savewithdoc );

Contact us