. Net generates Word files based on templates

Source: Internet
Author: User

Template document of Word

Personal data details


Customer name: <$ namefull $>


Mobile: <$ mobile $>


Contact Name: <$ contactman $>


Detailed address: <$ address $>


Email: <$ email $>



Province: <$ province $>



C # code string strtext = "<$ namefull $> ";
String replacestr = namefull;
Test. replacetext (strtext, replacestr );

String strtext1 = "<$ contactman $> ";
String replacestr1 = contactman;
Test. replacetext (strtext1, replacestr1 );

String strtext2 = "<$ email $> ";
String replacestr2 = Email;
Test. replacetext (strtext2, replacestr2 );

String strtext3 = "<$ address $> ";
String replacestr3 = address;
Test. replacetext (strtext3, replacestr3 );

String strtext4 = "<$ mobile $> ";
String replacestr4 = Mobile;
Test. replacetext (strtext4, replacestr4 );

String strtext5 = "<$ province $> ";
String replacestr5 = province;
Test. replacetext (strtext5, replacestr5 );

Word documents generated later

Personal data details


Customer name: Nansha lianfa Food Co., Ltd.


Mobile Phone: 13024128888


Contact Name: Li zhonhuang


Address: Jingang road synthetic industrial zone


Email: zhen3d@aee.com



Province: Guangdong




Download complete instance


If the code is running properly, you must install the office. If you have any questions, contact us.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.