我正在使用VBA创建Word文档,我只需要编辑页眉/页脚。当我在下面运行VBA时,页脚居中...如何右对齐?谢谢!
mylist = [1,5,7,10,13]
mydict = {
1:face1,2:face2,3:face3,4:face4,5:face5,6:face6,7:face7,
8:face8,9:face9,10:face10,11:face11,12:face12,13:face13
}
output = [mydict[key] for key in mylist]
>>> [face1, face5, face7, face10, face13]
答案 0 :(得分:2)
格式化页脚的内容有多种方法...
例如:
With ActiveDocument.Styles("Footer")
.Font.Name = "Arial"
.Font.Size = 9
.ParagraphFormat.Alignment = wdAlignParagraphRight
End With
基于问题代码的示例
.Footers(wdHeaderFooterPrimary).range.ParagraphFormat.Alignment = wdAlignParagraphRight
vbTab
):基于问题代码的示例
.Footers(wdHeaderFooterPrimary).range.Text = vbTab & vbTab & Format(Date, "Long Date")