> Does anyone know how to use activeX in Maltab so that
> you can write a multiline title text?
>
> Here's an excerpt of the code I'm using.
>
> titletext=sprintf('LINE1\nline2');
Microsoft Office uses char(13) to split multi-line strings. Matlab's sprintf() uses char(10) for '\n', which is the reason it didn't work for you. So, do this instead:
Thanks again.
I have another one for you or anybody else out there that might be able to answer. I can not get the correct font color for my text box in PowerPoint using ActiveX.
The RGB character string was being converted to an integer. The integer was then being used as an index to all the RGB colors (256^3 or 0->16777215). Here's how I corrected my problem and was able to get the correct text color for my textbox in PowerPoint.
text_box=invoke(new_slide.Shapes,'AddTextbox','msoTextOrientationHorizontal', 259.25, 20.75, 200, 20);
text_box.TextFrame.TextRange.Text='Hello';
text_box.TextFrame.TextRange.Font.Size=8;
text_box.TextFrame.TextRange.ParagraphFormat.Alignment = 'ppAlignCenter';
text_box.TextFrame.TextRange.Font.Bold = 'msoFalse';
%Convert RGB colors to an RGB color index
RGBcolor=[255,0,255]; RGBcolor=rem(RGBcolor,256);
RGBindex=RGBcolor(1)+RGBcolor(2)*256+RGBcolor(3)*65536;
text_box.TextFrame.TextRange.Font.Color.RGB=RGBindex;
Public Submission Policy
NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for
all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content.
Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available
via MATLAB Central. Read the complete Disclaimer prior to use.