J
Joe Ross
I am programmatically building a Word doc with C#. Everything is working
quite well; I've been pleasantly surprised so far.
I am now attempting to add a horitzontal line to the document at the
location of the cursor. I need to do this several times throughout the
document. I am currently using the following code:
object temp = wrdSelection.Range;
wrdDoc.Shapes.AddLine (0, 0, 500, 0, ref temp);
The 500 is abritrary...I'm having bigger problems.
Each time I call this, a line does get added to the document.
Unfortunately, it continuously gets pushed down to the bottom of the
document. If I call this code 5 times, at the end of the process I will end
up with 5 horizontal lines stacked on top of each other (they look like a
single line).
Any insight is appreciated.
Thanks
-joe
quite well; I've been pleasantly surprised so far.
I am now attempting to add a horitzontal line to the document at the
location of the cursor. I need to do this several times throughout the
document. I am currently using the following code:
object temp = wrdSelection.Range;
wrdDoc.Shapes.AddLine (0, 0, 500, 0, ref temp);
The 500 is abritrary...I'm having bigger problems.
Each time I call this, a line does get added to the document.
Unfortunately, it continuously gets pushed down to the bottom of the
document. If I call this code 5 times, at the end of the process I will end
up with 5 horizontal lines stacked on top of each other (they look like a
single line).
Any insight is appreciated.
Thanks
-joe