Dsoframer usage Summary

Source: Internet
Author: User

Recently, I have been trying to use VC #2005 to build a winform program with built-in word/office. Currently, we have the following solutions:

1. directly store the word/office window handle to winform through the API (complicated );

2. Use Web browser;

3. Use dsoframer.

I tested dsoframer and decided to use dsoframer to implement it.

Procedure:

1. Download dsoframer_kb311765_x86.exe from the micro-soft network and unlock it to get dsoframer. ocx;

2. Copy dsoframer. ocx to the system directory and register it. I wrote Reg. BAT to implement it:

Copy dsoframer. ocx c: \ windows \ system32 \ dsoframer. ocx
Regsvr32.exe c: \ windows \ system32 \ dsoframer. ocx

3. Start vs2005 and create a new winform C # program;

4. In the design toolbar, add new options, select the "tab" page on the pop-up page, browse, and select c: \ windows \ system32 \ dsoframer. OCX is added. The tool is named "DSO framer control object" in the design toolbar ";

5. Drag the tool to a design form window and add the following lines to the code file:

Private axdsoframer. axframercontrol axframercontrol1;

6. Open the file. This. axframercontrol1.open (_ filepath); // Note: _filepathis a file with a suffix of .doc).xls;

7. In this case, you can edit and save the opened Word/Excel files.

Note: during the operation, it is found that closing the print preview button will cause an error in Word/Excel. After searching for a long time, you can directly install office2003 SP3, haha, fix the bug, no error is reported.

I am very happy to write it down and share it with you. If you have any mistakes, please help us to point them out and make progress together.

In addition, the document is not good. Please forgive me.

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.