Word文档中的大小 [英] size in word document

查看:152
本文介绍了Word文档中的大小的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我打开ms-word文档时,此代码无法显示确切的磅数.

This code does not show me the exact size in points when i open a ms-word document.

Shape shpCanvas = oDoc.Shapes.AddCanvas(0, 0, 300, 300, ref oMissing);


正如我上面的代码,我为高度和宽度定义了300个点.但是,当我打开文档时,它将显示300磅的精确度.


As i the above code i define 300 points for height as well as for width. but when i open a document it will show me that exact 300 point it will show me more than that.

推荐答案

shpCanvas变量中返回了新添加的形状.为了满足您的需求,即最低300点,您可以编写以下代码:

Newly added shape is returned in shpCanvas variable. To satisfy your need i.e minimum 300 point, you can write the below code:

Shape shpCanvas = oDoc.Shapes.AddCanvas(0, 0, 300, 300, ref oMissing);
shpCanvas.MinWidth = xxx;
shpCanvas.MinHeight = xxx;


这篇关于Word文档中的大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆