Maayong adlaw sa tanan, nagka problema ko sa akong Excel/Word VBA codes, please help me, d ko expert sa Excel ako ra ni gi-follow ang document nga gi-pasa sa akong kauban nko unya d na mi ron officemate.
Akong Excel(2010) nag run ug macro nga i-import to Word(2010) ang problema kay ang ubang tables nga ma import sa Word mo jump sa next nga page. Not sure though asa ang error, sa Excel or Word, I think sa Word kay ma import man ang mga data. Mao ni ang code:
Selection.HomeKey Unit:=wdLine
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.Tables(1).Select (mao ni ang highlight sa error)
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 12
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.HomeKey Unit:=wdLine
Selection.Tables(1).Select
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 12
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.HomeKey Unit:=wdLine
Selection.Tables(1).Select
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 12
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.HomeKey Unit:=wdLine
Selection.Tables(1).Select
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 12
Selection.MoveDown Unit:=wdLine, Count:=2
Selection.HomeKey Unit:=wdLine
Selection.Tables(1).Select
Selection.Font.Name = "Times New Roman"
Selection.Font.Size = 12
ActiveWindow.ActivePane.SmallScroll Down:=4
Hours free/days
Selection.MoveUp Unit:=wdLine, Count:=15
Selection.HomeKey Unit:=wdLine
Selection.MoveRight Unit:=wdCharacter, Count:=6, Extend:=wdExtend
Selection.Rows.HeightRule = wdRowHeightAtLeast
Selection.Rows.Height = CentimetersToPoints(0.75)