C#中winform怎么调用word中的公式编辑器

来源:百度知道 编辑:UC知道 时间:2024/05/29 01:01:24
想做一个题库方面的东西,想请教一下,用C#怎么调用word中的公式编辑器。
还有批量导入方面的思路(批量导入的文件为word文件)。谢谢。
经过了半个月的查询我给个答案吧,免得很多朋友像我一样走弯路。MathMLControl这个可以使用。网上有破解版的。如果需要给我留言也可以。

分式编辑,这只能在C#里集成吧.

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Word = Microsoft.Office.Interop.Word;
using System.Diagnostics;

namespace VSTOInsertEquations
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}

private void button1_Click(object sender, EventArgs e)
{
Word.Application wdApplication = null;
Process[] pl = Process.GetProcessesByName("WINWORD.exe");
if (pl.Length > 0)
{
wdApplication = (Word.Application)System.Runtime.InteropServices
.Marshal.GetActiveObject("Word.Application");
}