Click here to Skip to main content
16,018,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
This code does not show me the exact size in points when i open a ms-word document.
C#
Shape shpCanvas = oDoc.Shapes.AddCanvas(0, 0, 300, 300, ref oMissing);

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.
Posted
Updated 27-Oct-11 4:03am
v2

1 solution

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

C#
Shape shpCanvas = oDoc.Shapes.AddCanvas(0, 0, 300, 300, ref oMissing);
shpCanvas.MinWidth = xxx;
shpCanvas.MinHeight = xxx;
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900