1
我的代码:不能键入 'System.Drawing.Font' 隐式转换为 'Microsoft.Office.Interop.Word.Font'
public class Fonts
{
Font Header = new System.Drawing.Font("Tahoma", 10, FontStyle.Bold);
ToWord ToWord = new ToWord(Header);
}
public class ToWord
{
public ToWord(System.Drawing.Font Header)
{
......
Paragraph pIndex = DocumnetWord.Paragraphs.Add(ref oMissing);
pIndex.Range.Font =Header;//error compile....
}
}
错误:
无法隐式转换类型“系统.Drawing.Font'到 'Microsoft.Office.Interop.Word.Font'
什么是正确的代码?
有没有办法转换? – mrJack