如果在word中,将表格中的数字设置为向右居中,那么录制的宏如下:
Sub 宏1()
‘
‘ 宏1 宏
‘
‘
Selection.SelectCell
Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter
End Sub
那么怎么才能使用ahk来完成呢?为什么下面的脚本无法使用?
F1::
ComObjActive(“excel.application”).Selection.SelectCell
ComObjActive(“excel.application”).Selection.ParagraphFormat.Alignment = wdAlignParagraphRight
ComObjActive(“excel.application”).Selection.Cells.VerticalAlignment = wdCellAlignVerticalCenter
return