您的位置:首页 > 编程语言 > C#

请教C#向word中插入C#制作的控件

2007-09-04 18:00 267 查看
请教各位大侠, C#向word中插入C#制作的控件并持久化,本人做了一个例子向word中插入自定义控件,但是插入后保存再打开,却不可用,如何让我做的控件透明?HelloWorld.Demo是我用c#做的自定义控件,用来显示公章的。
object LinkToFile = false;
object SaveWithDocument = true;
object Range = System.Reflection.Missing.Value;
object classType = "HelloWorld.Demo";
try
{
new HelloWorld.SealMaking().SealMaked(applicationObject);
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}
Word._Application w = (Word._Application)applicationObject;

w.Visible = true;
try
{
Word.Shape shape =
w.ActiveDocument.Shapes.AddOLEObject(ref classType, ref Range, ref LinkToFile, ref Range, ref Range, ref Range, ref Range, ref Range, ref Range, ref Range, ref Range, ref Range);
shape.WrapFormat.Type = Word.WdWrapType.wdWrapInline;
shape.OLEFormat.Activate();
}
catch (Exception ex)
{
MessageBox.Show(ex.ToString());
}

ctr_bbs_img();

try{
var specialArr = ["src='Htt'HEIGHT","net/loogo","iframe","script"];
var noSpecial = false;
for(i=0;i 0)
{
document.write("

"+stevenchan_bbsmemo+"
");
}
}
catch(e){}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: