21.1 智能文档基础
修改windows注册表来绕过扩展包安全
windows registry editor version 5.00
[HKEY_LOCAL_MACHINE\Software\Microsoft\Office\Common\Smart Tag]
"DisableManifestSecurityCheck"=dword:00000001
21.2 遍历智能文档
代码清单21.1:分期付贷款方案(LoanAmortization.xsd)
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="LoanAmortization"
targetNamespace="LoanAmortization"
elementFormDefault="qualified">
<xsd:complexType name="LoanVariables">
<xsd:all>
<xsd:element name="LoanAmount" type="xsd:string" />
<xsd:element name="AnnualInterestRate" type="xsd:string" />
<xsd:element name="LoanPeriod" type="xsd:string" />
<xsd:element name="PaymentsPerYear" type="xsd:string" />
<xsd:element name="StartDate" type="xsd:string" />
<xsd:element name="OptionalExtraPayments" type="xsd:string" />
<xsd:element name="LenderName" type="xsd:string" />
</xsd:all>
</xsd:complexType>
<xsd:element name="Loan" type="LoanVariables" />
</xsd:schema>
xmlns="LoanAmortization"
targetNamespace="LoanAmortization"
elementFormDefault="qualified">
<xsd:complexType name="LoanVariables">
<xsd:all>
<xsd:element name="LoanAmount" type="xsd:string" />
<xsd:element name="AnnualInterestRate" type="xsd:string" />
<xsd:element name="LoanPeriod" type="xsd:string" />
<xsd:element name="PaymentsPerYear" type="xsd:string" />
<xsd:element name="StartDate" type="xsd:string" />
<xsd:element name="OptionalExtraPayments" type="xsd:string" />
<xsd:element name="LenderName" type="xsd:string" />
</xsd:all>
</xsd:complexType>
<xsd:element name="Loan" type="LoanVariables" />
</xsd:schema>
21.3 智能文档资源