Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
setting property of activex command
Posted:
Oct 24, 2012 5:59 AM
|
|
I'm trying to add a continuous section break to a microsoft word document via activex.
I can see the VB code which adds a new section by recording the action as a macro in word. That VB code is: Selection.InsertBreak Type:=wdSectionBreakContinuous
My Matlab code is:
% setup activex component WordFileName='Latest_Report.doc'; CurDir=pwd; FileSpec = fullfile(CurDir,WordFileName); [ActXWord,WordHandle]=StartWord(FileSpec); Style='Normal';
% insert the pagebreak set(actx_word_p.Selection.InsertBreak,'Type','wdSectionBreakContinuous')
The error it throws up is: One or more output arguments not assigned during call to "InsertBreak".
is the problem that the InsertBreak command is occurring before setting the type?
I've tried shuffling the commands around, but no luck. I get the same error every time.
Could I set the "type" property before invoking the insertbreak command
|
|
|
|