Word Insert => header => motion => oddpage

Word Insert => header => motion => oddpage
I want to implement the functionality in the screenshot. Is there a defined function or enum value that simplifies implementation of the function?스크린샷 2018-02-22 오후 2.09.03.jpg (121.4 KB)

@yunpat81,

Please try running the following code:

Document doc = new Document(MyDir + @"in.docx");
Document dot = new Document(MyDir + @"Building Blocks.dotx");

DocumentBuilder builder = new DocumentBuilder(doc);
builder.MoveToHeaderFooter(HeaderFooterType.HeaderPrimary);

HeaderFooter hf = doc.FirstSection.HeadersFooters[HeaderFooterType.HeaderPrimary];

foreach (BuildingBlock bb in dot.GlossaryDocument.BuildingBlocks)
{
    if (bb.Name.Equals("Motion (Odd Page)"))
    {
        foreach (Node node in bb.FirstSection.Body)
        {
            hf.InsertAfter(doc.ImportNode(node, true), hf.LastChild);
        }
    }
}

hf.FirstParagraph.Remove();

doc.Save(MyDir + @"18.2.docx");

Sample documents:
Motion (Odd Page).zip (23.6 KB)