111,129
社区成员
发帖
与我相关
我的任务
分享
Sub create_catalog()
'
' create_catalog 宏
'
'
End Sub
public void AddCatalog()
{
wdApp.Selection.Start = 0;
wdApp.Selection.End = 0;//将光标移动到文档开始位置
object beginLevel = 1;//目录开始深度
object endLevel = 2;//目录结束深度
object rightAlignPageNumber = true;// 指定页码右对其
wdApp.ActiveDocument.TablesOfContents.Add(
wdApp.Selection.Range ,
ref Nothing ,
ref Nothing ,
ref Nothing ,
ref Nothing ,
ref Nothing ,
ref rightAlignPageNumber ,
ref Nothing ,
ref Nothing ,
ref Nothing ,
ref Nothing ,
ref Nothing);//写入目录
}