[CONNECT C++] Modifying Text Properties

Trying to figure out how to modify text parameters (e.g. Bold/Italics/etc)  for existing text. I get a SUCCESS return from ReplaceTextPart(), but there is no change in the "italics" setting...

ITextEditP			editor = eeh.GetITextEdit();
if (editor && editor->IsTextElement(eeh))
{
	TextBlockPtr		textBlock = TextHandlerBase::GetFirstTextPartValue(eeh);
	if (textBlock.IsValid())
	{
		RunPropertiesR			runProps = textBlock->GetRunPropertiesForAddR();
		runProps.SetIsItalic(true);
		textBlock->SetRunPropertiesForAdd(runProps);
		textBlock->PerformLayout();
	}
	T_ITextPartIdPtrVector		partIDs;
	editor->GetTextPartIds(eeh,*ITextQueryOptions::CreateDefault(), partIDs);
	ITextEdit::ReplaceStatus  rStatus = editor->ReplaceTextPart(eeh, *partIDs[0], *textBlock);
	wprintf(L"rStatus=%d\n", rStatus);
}

Parents Reply Children
No Data