Hi,
I need to switch between different fonts in a single textframe. I like to write a headline in bold and a description without bold. I tried the following:
// This shape is a text placeholder i selected
IAutoShape iAutoShape = (IAutoShape)shape;
// start with no bold
iAutoShape.TextFrame.Text += “TESTNoBold”;
//use the textframe to get font information
ITextFrame tf1 = iAutoShape.TextFrame;
// Accessing the first Paragraph
IParagraph para1 = tf1.Paragraphs[0];
// Accessing the first portion
IPortion port1 = para1.Portions[0];
// Set font to Bold
port1.PortionFormat.FontBold = NullableBool.True;
iAutoShape.TextFrame.Text += “TESTBold”;
// Set font to back to no bold
port1.PortionFormat.FontBold = NullableBool.False;
iAutoShape.TextFrame.Text += “TESTNoBold”;
Could you point me in the right direction? Do i need more paragraphs?
Thanks