|
if(app!=null && app.Documents.Count!=0)
{
object i=1;
object listFormat=Word.WdDefaultListBehavior.wdWord10ListBehavior;
//Word.ListTemplates listTemps=app.ListGalleries[Word.WdListGalleryType.wdNumberGallery].ListTemplates;
//listTemps=app.ActiveDocument.ListTemplates.
Word.ListTemplate listTemp=app.ListGalleries[Word.WdListGalleryType.wdNumberGallery].
ListTemplates.get_Item(ref i);
object bContinuousPrev=true;
object applyTo=Missing.Value;
object defaultListBehaviour=Missing.Value;
Word.ListFormat format=app.ActiveDocument.Paragraphs[1].Range.ListFormat;
app.ActiveDocument.Paragraphs[1].Range.ListFormat.ApplyListTemplate(
listTemp,ref bContinuousPrev,
ref applyTo,
ref defaultListBehaviour
);
app.ActiveDocument.Paragraphs[2].Range.ListFormat.ApplyListTemplate(
listTemp,
ref bContinuousPrev,
ref applyTo,
ref defaultListBehaviour);
}
|