Quantcast
Channel: Word for Developers forum
Viewing all articles
Browse latest Browse all 4350

document.Shapes.AddTextbox ignores anchor (Word 2013)

$
0
0

Hi everyone

I've been using the following code (c#; interop via NetOffice) for quite a while, it worked perfectly in Word 2007/2010 (with some position adaption for 2010).

Shape textBox = document.Shapes.AddTextbox(MsoTextOrientation.msoTextOrientationHorizontal, left, top, (float)size.Width, (float)size.Height, p.Range);

It's supposed to create a textbox that's anchored at a specific paragraph p. However, it seems that the anchor is just not considered at all. I seems that only the position provided (left and top) are considered.  However, with the desired position (which has to be a dynamic setting) the textbox is anchored at the previous paragraph and not at the correct one.

Is this a bug?

Thanks for any help
Chabun


Viewing all articles
Browse latest Browse all 4350

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>