Esempio n. 1
0
 static void CopyAcrossAnyPrecedentInstructions(Wd.Document doc, string Path)
 {
     var OpenXmlDoc = new OpenXml.WordDocument(new FileInfo(Path));
     foreach (var variable in OpenXmlDoc.Variables)
         if (variable.Name.StartsWith("PrecedentInstruction_"))
             doc.SetDocVar(variable.Name, variable.Value.Replace("_x000d__x000a_",""));
 }
Esempio n. 2
0
 static void CopyDocumentVariables(Wd.Document target, Wd.Document source)
 {
     foreach (Wd.Variable var in source.Variables)
         target.SetDocVar(var.Name, var.Value);
 }