为什么我的图片出现在文字之前
Why does my picture appear before the text?
我正在使用Visual C 自动词,在以下代码中,我尝试插入文本,然后是图片:
// OLEParagraphs is an object of COLEParagraphs
COLEParagraph LastParagraph = OLEParagraphs.get_Last();
COLERange LastParagraphRange = LastParagraph.get_Range();
COLEInlineShapes InlineShapes = LastParagraph.get_InlineShapes();
LastParagraphRange.put_Text(_T(“See picture below:”));
InlineShapes.AddPicture(strPicFileName, COleVariant(0l), COleVariant(1l), DOCX_VARIANT_OPTIONAL);
但是,执行代码后,我发现文本总是在图片之后,而不是图片前放置,为什么?
谢谢
给定范围参数的描述(您提供docx_variant_optional的最后一个):
Optional Object. The location where the picture will be placed in the text. If the range isn't collapsed, the picture replaces the range; otherwise, the picture is inserted. If this argument is omitted, the picture is placed automatically.
我猜这与"自动放置"有关。尝试在文本之前插入占位符范围,并将其指定为位置。
相关文章:
- 我的神经网络不起作用 [XOR 问题]
- C++我的数学有什么问题,为什么我的代码不能正确循环
- 我的字符计数代码计算错误.为什么
- 为什么我的C#代码在调用回C++COM直到Task时会暂停.等待/线程.加入
- cmake在我的项目中所需的所有静态库都不成功
- 为什么我的代码在输出中增加了93天
- 我的简单if-else语句是如何无法访问的代码
- 为什么我的for循环不能正确获取argv
- 我的项目不会像"undefined reference to `grpc::g_core_codegen_interface'"那样使用未定义的引用错误进行编译
- 0-1背包代码中的错误.我的代码中有什么错误
- 当我的阵列太大时出现分段错误
- 如何确认我的constexpr表达式实际上已经在编译时执行
- 为什么二进制搜索在我的测试中不起作用
- 如何指定我希望我的LIB链接到的DLL文件?-Visual Studio 2019
- 为什么我的类的副本初始化不适用于使用字符串文字的string_view?
- 为什么我的拆卸C 代码使用指令指针和偏移来获取字符串文字
- 为什么我的图片出现在文字之前
- 当我用口音保存JSON时,我的文字错误(QT)
- 为什么我需要一个类似于复合文字的临时构造来初始化我的std::数组成员
- 哦,不!我的文字在闪烁