very nice structure of code and easy to understand and use. However the hard coded format styles for headings and text styles make it hard to ease automatic doc generation for our multi-cultural office environments ;)
...however I cannot blame to the author of this code for this!
Sorry about multiple submissions.
Actxserver object had trouble creating files that do not already exist because of trouble/corruption with MAPI32.dll, which is called from Outlook, not Word.? If the file already exists (e.g. TestDoc.doc), it worked no problem.
I have not tried fixing MAPI32.dll, but that may solve problem.
it doesn't work with office 10
this is the error i receive
??? Invoke Error, Dispatch Exception:
Source: Microsoft Word
Description: ???? ??? ????? ???? ????.
Help File: C:\Program Files\Microsoft Office\Office10\1037\wdmain10.chm
Help Context ID: 62e2
Error in ==> WriteToWordFromMatlab>WordText at 198
actx_word_p.Selection.Style = style_p;
Error in ==> WriteToWordFromMatlab at 29
WordText(ActXWord,TextString,Style,[0,2]);%two enters after text
In here again checking out what happened during the years. THANKS for all the nice comments!
For Mr. Dirk Z I can say that you should open the file and read the comments. That will give you the hint of doing a search/replace - easy. Read Dimitri Gabris comment from 11 Apr 2006...
After a lot of years as a Matlab/Simulink-programmer I'm now a consultant programming in other languages. Missing the power of Matlab.
If you need help with some Matlab/Simulink coding I would be glad to help...