2016-11-11 7 views

답변

0

요구 사항을 충족하려면 다음 코드 예제를 사용하십시오. 희망이 당신을 도와줍니다.

FindReplaceOptions options = new FindReplaceOptions(); 
Document doc = new Document(MyDir + "in.docx"); 
doc.MailMerge.UseNonMergeFields = true; 
foreach (String item in doc.MailMerge.GetFieldNames()) 
{ 
doc.Range.Replace("{{ " + item + " }}", "<<["+ item + "]>>", options); 
} 

doc.Save(MyDir + "Out.docx"); 

개발자 용 전도사로 Aspose와 협력합니다.