V
Viswa
I am trying to replace the macro defined in a text box with text
programatically (VC++) with the following method.
In Publisher::TextRangePtr->PutText
This workes fine in ms publisher 2003 but in ms publisher 2007 removes twice
the size.
Following are the steps i followed
Publisher::TextRangePtr &TRange
TRange->Collapse( Publisher:bCollapseStart );
TRange->MoveStart( Publisher:bTextUnitCharacter, istart);
TRange->MoveEnd( Publisher:bTextUnitCharacter, iend - istart);
CString szDbgOrigText = (LPCTSTR)TRange->GetText(); // I have correct data
// replace the text with its value
TRange->PutText((_bstr_t)szValue); // At the end its find. But string at the
begining and moddle removed teh twice the bytes
// expand the text area to the entire "story"
TRange->Expand( Publisher:bTextUnitStory );
CString szDbgNewText = (LPCTSTR)TRange->GetText(); Shows me the text by
rmoving the twice teh size i.e (iend - istart) * 2
It works find in 2003 but not sure whats teh problem with 2007.
Any help?
programatically (VC++) with the following method.
In Publisher::TextRangePtr->PutText
This workes fine in ms publisher 2003 but in ms publisher 2007 removes twice
the size.
Following are the steps i followed
Publisher::TextRangePtr &TRange
TRange->Collapse( Publisher:bCollapseStart );
TRange->MoveStart( Publisher:bTextUnitCharacter, istart);
TRange->MoveEnd( Publisher:bTextUnitCharacter, iend - istart);
CString szDbgOrigText = (LPCTSTR)TRange->GetText(); // I have correct data
// replace the text with its value
TRange->PutText((_bstr_t)szValue); // At the end its find. But string at the
begining and moddle removed teh twice the bytes
// expand the text area to the entire "story"
TRange->Expand( Publisher:bTextUnitStory );
CString szDbgNewText = (LPCTSTR)TRange->GetText(); Shows me the text by
rmoving the twice teh size i.e (iend - istart) * 2
It works find in 2003 but not sure whats teh problem with 2007.
Any help?