C#写word中的各个文字颜色样式不同

white1ge 2020-06-17 10:29:29

如图所示
控制台开发编写
...全文
430 1 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
公共马甲0315 2020-08-02
  • 打赏
  • 举报
回复
OLE智能指针,Office自动化接口。对Office2010有效,但好像 2019之类的版本都无法调用了,没有这个接口函数了。

	Word::_ApplicationPtr    myApp;
	Word::DocumentsPtr       spDocs;
	Word::_DocumentPtr       _spdoc;
	Word::SelectionPtr       spsel;
	Word::_FontPtr           sFont;
	Word::ParagraphsPtr      oParagraphs;
	Word::ParagraphPtr       oParagraph;
	Word::InlineShapesPtr    spshape;
	Word::ShapesPtr          shapes;
	Word::_DocumentPtr       activedoc;
	Word::RangePtr           oTargetRange;
//根据需要调用相应的API函数......

5,172

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 Office开发/ VBA
社区管理员
  • Office开发/ VBA社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧