我安了2019版後,發現原先採錄製巨集的方法(2016版),本可直接由頁尾或頁首處點兩下中間空白處就可以切到中間文章區。
但不知是否我不熟悉2019版,還是word的指令不同,所以我在錄製巨集時,插入頁首、頁尾後,卻無法切換游標至中間文章區..
想請教要如何切換過去,?以下是我錄製插入頁首、頁尾的陳述式..謝謝
Sub 自訂版面()
'跳到word標頭區
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
'選取標題列
ActiveDocument.Select
'刪除標題選取反白區
Selection.Delete Unit:=wdCharacter
'對標頭做插入 含標題+日期 (下段看不太懂望有懂的人能稍解釋下)
If ActiveWindow.View.SplitSpecial <> wdPaneNone Then
ActiveWindow.Panes(2).Close
End If
If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _
ActivePane.View.Type = wdOutlineView Then
ActiveWindow.ActivePane.View.Type = wdPrintView
End If
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Application.Templates( _
"C:\Users\我的名稱\AppData\Roaming\Microsoft\Document Building Blocks\1028\16\Built-In Building Blocks.dotx" _
).BuildingBlockEntries("格線").Insert Where:=Selection.Range, RichText:= _
True
'選取標題列
ActiveDocument.Select
'對標頭設定字體大小等
' Selection.HomeKey Unit:=wdLine, Extend:=wdExtend
' ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
With Selection.Font
.Bold = 1
.Size = 16
.Name = "華康刷刷體W7"
.Color = RGB(128, 10, 128)
End With
'插入頁碼至頁尾
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
'選取頁尾列
ActiveDocument.Select
'刪除舊有資料
Selection.Delete Unit:=wdCharacter, Count:=1
'設定起始頁碼為1
Selection.TypeText Text:="1"
'選取頁尾列
ActiveDocument.Select
With Selection
.ParagraphFormat.Alignment = wdAlignParagraphCenter '將頁碼置中
With .Font '設定字體大小與樣式
.Size = 13
.Name = "Forte"
End With
'接下來我要切到中間的空白區,但在錄製巨集時,無論怎麼點中間都無法至中間處...求解..謝謝
PS:我在想應該是跟這段陳述式大同小異,但不知道後面(藍色處)要接什麼?或要到哪查其物件、方法呢?
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter