Insert absolute positioned shape without adding paragraph in document

I’m making a document where I need to put some text and a picture in the header part of the document on one page. I’m able to do that by making a textbox, and setting position like so:

Shape tableBox = new Shape(myDocument, ShapeType.TextBox);
tableBox.RelativeHorizontalPosition = RelativeHorizontalPosition.Page;
tableBox.RelativeVerticalPosition = RelativeVerticalPosition.Page;
tableBox.HorizontalAlignment = HorizontalAlignment.Left;
tableBox.VerticalAlignment = VerticalAlignment.Top;

My problem is that when I insert it with
myDocumentBuilder.InsertNode(tableBox);
it leaves an empty paragraph. I’d like it to not leave a trace in the structure of the document. So that my next element can begin exactly where I was when I inserted the tableBox. Anyone got any advice for me?

@eivindS,

Thanks for your inquiry. We suggest you please read following article.
Aspose.Words Document Object Model

To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input Word document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file.
  • Please create a standalone console application (source code without compilation errors) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them.