问题描述
通过修改注册表就可以不出现提示,可让每个使用的客户端都修改注册表太麻烦吧?stringname="CNSI.doc";objectfilename="C://"+name;stringcontent;MSWord.ApplicationwordApp;MSWord.DocumentwordDoc;wordApp=newMSWord.ApplicationClass();Objectnothing=Missing.Value;wordDoc=wordApp.Documents.Add(refnothing,refnothing,refnothing,refnothing);content="这一行是14号字体的文本"+"n"+"sdfsf"+"n"+"sdfsfd";wordDoc.Paragraphs.Last.Range.Font.Size=15;wordDoc.Paragraphs.Last.Range.Text=content;wordDoc.SaveAs(reffilename,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing,refnothing);wordDoc.Close(refnothing,refnothing,refnothing);wordApp.Quit(refnothing,refnothing,refnothing);
时间: 2024-09-29 04:57:42