Hi,
According this https://docs.aspose.com/words/net/insert-and-append-documents/
article I’ve inserted VBA form into destination document.
here is the code:
// Open the destination document.
Document dstDoc = new Document("macros.doc");
// Open the source document.
Document srcDoc = new Document(filePath);
// For a twist, let's say I want the second document to start on the same page where
// the first document ends. This is controlled by a property of the first section.
srcDoc.FirstSection.PageSetup.SectionStart = SectionStart.Continuous;
// Combine the documents, see the function below.
AppendDoc(dstDoc, srcDoc);
// Save the finished document.
dstDoc.FirstChild.Remove();
dstDoc.Save(filePath);
It works fine, but I have more questions :
- How can I insert one more VBA module;\ - How can I delete inserted module, without using
dstDoc.RemoveMacros();
Thanks,
Valera