http://support.microsoft.com/default.aspx?kbid=303296
解决方案 »
- .net画柱状图
- DataGridView 的 排序问题
- 关于netadvantage 中的WebGrid 添加列的问题
- 为什么服务引用总是生成不对
- 关于在remoting中触发事件时,遇到的一个异常!!!!!!!!
- 求助,C#调用VC写的DLL问题,请高手指教一下
- 试用期的超bt 练习题:Form 上面嵌个Excel,真tmd挂了,混不下去了,有卓越的顶级高手能救一命吗??
- [没有分了,以后补!]再请前辈指教!
- 100分求批量文件复制并将相关属性写入到SQL Server的代码
- 请教高手,关于HTML Help Workshop制作.chm文件有的图片不显示问题?
- 请问如何在一个控件上画一张图片
- 怎么样动态的实现对控件的实别??谢谢 帮忙看看吧!!
private void DisplayDocumentProperties()
{
Office.DocumentProperty prp = null;
Office.DocumentProperties prps =
(Office.DocumentProperties)
ThisWorkbook.BuiltinDocumentProperties; Excel.Range rng = ThisApplication.
get_Range("DocumentProperties", Type.Missing);
int i = 0; try
{
ThisApplication.ScreenUpdating = false; try
{
// Set the Revision Number property:
prp = prps["Revision Number"];
prp.Value = Convert.ToInt32(prp.Value) + 1; // Dump contents of the collection:
i = DumpPropertyCollection(prps, rng, i);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, ThisApplication.Name);
} // Work with custom properties:
try
{
prps = (Office.DocumentProperties)
ThisWorkbook.CustomDocumentProperties;
DumpPropertyCollection(prps, rng, i);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, ThisApplication.Name);
} // Add a custom property:
try
{
// Delete the property, if it exists.
prp = prps["Project Name"];
prp.Delete();
}
catch
{
// Do nothing if you get an exception.
}
try
{
// Add a new property.
prp = prps.Add("Project Name", false,
Office.MsoDocProperties.msoPropertyTypeString,
"White Papers", Type.Missing);
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, ThisApplication.Name);
}
}
finally
{
ThisApplication.ScreenUpdating = true;
}
}private int DumpPropertyCollection(
Office.DocumentProperties prps, Excel.Range rng, int i)
{
foreach (Office.DocumentProperty prp in prps)
{
rng.get_Offset(i, 0).Value2 = prp.Name;
try
{
if (prp.Value != null )
{
rng.get_Offset(i, 1).Value2 =
prp.Value.ToString();
}
}
catch
{
// Do nothing at all.
}
i += 1;
}
return i;
}
姐姐,能给出其他项目的英文名称吗,
比如作者是Auther
给分
比如作者是Auther
给分