2023年12月14日发(作者:)

获取系统安装字体

InstalledFontCollection MyFont=new InstalledFontCollection();

FontFamily[] MyFontFamilies=es;

int Count=;

for(int i=0;i

using System;

using c;

using entModel;

using ;

using g;

using ;

using ;

using ;

using ;

namespace word

{

public partial class Form1 : Form

{

public Form1()

{

InitializeComponent();

}

private void Form1_Load(object sender, EventArgs e)

{

Object Nothing = ;

//Directory("D:/CNSI"); //创建文件所在目录

string name = "CNSI_" + DateString() + ".doc";//文件名

object filename = "D://CNSI//" + name;

ation WordApp = new ationClass();

nt WordDoc = (ref Nothing, ref Nothing,

ref Nothing, ref Nothing);

InstalledFontCollection MyFont = new InstalledFontCollection();

FontFamily[] MyFontFamilies = es;

{

}

string FontName=MyFontFamilies[i].Name;

(FontName);

int Count = ;

for (int i = 0; i < Count; i++)

{

string FontName = MyFontFamilies[i].Name;

= FontName;

= 30;

=FontName+"n";

object count = 30;

object WdLine = ;

wn(ref WdLine, ref count, ref Nothing);//移动焦点

}

//ent =

nParagraphRight;

//文件保存

(ref filename, ref Nothing, ref Nothing, ref Nothing, ref

Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing,

ref Nothing, ref Nothing, ref Nothing, ref Nothing, ref Nothing);

(ref Nothing, ref Nothing, ref Nothing);

(ref Nothing, ref Nothing, ref Nothing);

}

}

}