fieldset{padding:10px;}
VBA Word编程用Add方法可在指定区域内添加备注。下列示例紧接着选定内容添加一条备注。Selection.CollapseDirection:=wdCollapseEndActiveDocument.Comments.AddRange:=Selection.Range,_Text:=”reviewthis”如何用BCB表示呢?另外Delete方法又如何实现呢?——解决方案——————————————————–OLE专业户来也!!!翻译过来大概是这个样子:
vWordApp.OlePropertyGet("Selection").OleProcedure("Collapse",0);//wdCollapseEndVariantvRange=vWordApp.OlePropertyGet("Selection").OlePropertyGet("Range");AnsiStringstrText="reviewthis";vWordApp.OlePropertyGet("ActiveDocument").OlePropertyGet("Comments").OleFunction("Add",vRange,strText.c_str());
人生谁无少年时,甜苦酸辛各自知。