Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: setting property of activex command
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Adam Chapman

Posts: 171
Registered: 1/12/09
setting property of activex command
Posted: Oct 24, 2012 5:59 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

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



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.