设置标题1及样式
%启动word
word = actxserver('Word.Application'); %start Word
%设置页面可见
word.Visible =1; %make Word Visible
%创建新的word文档
document=word.Documents.Add; %create new Document
selection=word.Selection; %set Cursor
%设置标题1
selection.TypeText('我是标题1');
selection.Style='标题 1';
selection.TypeParagraph;
H1 = document.Styles.Item('标题 1');
H1.Font.Name = 'Garamond';
H1.Font.Size = 20;
H1.Font.Bold = 1;
H1.Font.TextColor.RGB=60000;
效果如下: