c# - 在 Word VSTO 加载项中查找文档边框和表格之间的距离
问题描述
我正在尝试查找 Word 文档的左边框和 VSTO 中表格的左边框之间的像素距离。
我已经尝试过以下方法:
int height = table.Range.Information[Word.WdInformation.wdVerticalPositionRelativeToTextBoundary];
// This isn't working - there is no get_information method in Range object
Word.Range range = table.Rows[1].Range;
int height =
range.get_Information(Word.WdInformation.wdActiveEndAdjustedPageNumber);
有没有办法做到这一点,或者 VSTO 会阻止对相对于页面的像素进行操作?
解决方案
推荐阅读
- javascript - 农业网格中的可编辑组单元格
- javascript - 类型检查在常规 JS-File 中的 VSCode 中引发错误
- javascript - 从 core-js/regenerator-runtime 的直接导入迁移到完全“自动”的 Babel 配置?
- windows - 命令行 vs 命令提示符 vs 终端?贝壳?
- reactjs - 如何在 React.js 中动态选择/取消选择复选框
- delphi - IntraWeb 应用程序在将文件作为附件发送到浏览器时锁定
- ubuntu - Linux crontab 不复制文件
- javascript - 将 PHP Doctrine 日期转换为 JS
- ios - splitViewController(_:collapseSecondary:onto:) 没有被调用
- web-applications - PWA 或 Web App 能否在离线环境(无互联网连接)中将自身共享到另一部手机?