"Default1Controller.cs" is not avaiable in the solution, but even I take a look at the file in the folder, there is actually no reference to my requst.
No my code looks like this:
private void InitMethod()
{
WordDocument word = new WordDocument();
word.Open(someStream, FormatType.Docx);
word.Replace("someString", MethodWhichWillResultTheEntireContent(), false, false);
}
private WordDocument MethodWhichWillResultTheEntireContent()
{
WordDocument word = new WordDocument();
word.EnsureMinimal();
WParagraph p1 = word.LastSection.AddParagraph() as WParagraph;
WParagraph p1graph = word.LastSection.HeadersFooters.Header.AddParagraph() as WParagraph;
p1graph.AppendText("Header footer");//this is NOT visible in the document
p1.AppendText("first page"); //this is visible in the document
return word;
}
Right now I do not even get the header/footer.