& vbCr & _
"End With" & vbCr & _
"With Range(""A""+trim(BgnCnt)+"":D""+trim(BgnCnt+HeadRowCnt-1))" & vbCr & _
" .Font.Size = 11" & vbCr & _
" .Font.Bold = True" & vbCr & _
" .Borders.LineStyle = xlLineStyleNone" & vbCr & _
" .VerticalAlignment = xlCenter" & vbCr & _
" .HorizontalAlignment = xlCenter" & vbCr & _
" .Orientation = xlHorizontal" & vbCr & _
"End With" & vbCr & _
"With Range(""A""+trim(BgnCnt+HeadRowCnt)+"":D""+trim(BgnCnt+HeadRowCnt+TitleRowCnt-1))" & vbCr & _
" .WrapText = True" & vbCr & _
" .Font.Size = 9" & vbCr & _
" .Font.Bold = True" & vbCr & _
" .VerticalAlignment = xlCenter" & vbCr & _
" .HorizontalAlignment = xlCenter" & vbCr & _
" .Orientation = xlHorizontal" & vbCr & _
"end With" & vbCr & _
"With Range(""A""+trim(BgnCnt+HeadRowCnt+TitleRowCnt+ContentRowCnt)+"":D""+trim(BgnCnt+HeadRowCnt+TitleRowCnt+ContentRowCnt+FootRowCnt-1))" & vbCr & _
" .Font.Size = 9" & vbCr & _
" .Font.Bold = True" & vbCr & _
" .Borders.LineStyle = xlLineStyleNone" & vbCr & _
" .VerticalAlignment = xlCenter" & vbCr & _
" .HorizontalAlignment = xlLeft" & vbCr & _
" .Orientation = xlHorizontal" & vbCr & _
"end With" & vbCr & _
"PageNo=PageNo+1" & vbCr & _
"BgnCnt=BgnCnt+PageRowCnt" & vbCr & _
"loop" & vbCr & _
"With Sheet1.PageSetup" & vbCr & _
" .HeaderMargin = application.CentimetersToPoints(0)" & vbCr & _
" .LeftMargin = application.CentimetersToPoints(2)" & vbCr & _
" .RightMargin =application.CentimetersToPoints(2)" & vbCr & _
" .TopMargin = application.CentimetersToPoints(1)" & vbCr & _
" .BottomMargin = application.CentimetersToPoints(1)" & vbCr & _
" .FooterMargin = application.CentimetersToPoints(0)" & vbCr & _
"' .Orientation = xlLandscape" & vbCr & _
" .Orientation = xlPortrait" & vbCr & _
" .CenterHorizontally = True" & vbCr & _
" .CenterVertically = False" & vbCr & _
" .PaperSize = xlPaperA4" & vbCr & _
"End With" & vbCr & _
"Range(""A1"").Select" & vbCr & _
"end sub"
xlmodule.CodeModule.AddFromString (strCode)
xlApp.Run "MyMacro"
end sub
</script>
"End With" & vbCr & _
"With Range(""A""+trim(BgnCnt)+"":D""+trim(BgnCnt+HeadRowCnt-1))" & vbCr & _
" .Font.Size = 11" & vbCr & _
" .Font.Bold = True" & vbCr & _
" .Borders.LineStyle = xlLineStyleNone" & vbCr & _
" .VerticalAlignment = xlCenter" & vbCr & _
" .HorizontalAlignment = xlCenter" & vbCr & _
" .Orientation = xlHorizontal" & vbCr & _
"End With" & vbCr & _
"With Range(""A""+trim(BgnCnt+HeadRowCnt)+"":D""+trim(BgnCnt+HeadRowCnt+TitleRowCnt-1))" & vbCr & _
" .WrapText = True" & vbCr & _
" .Font.Size = 9" & vbCr & _
" .Font.Bold = True" & vbCr & _
" .VerticalAlignment = xlCenter" & vbCr & _
" .HorizontalAlignment = xlCenter" & vbCr & _
" .Orientation = xlHorizontal" & vbCr & _
"end With" & vbCr & _
"With Range(""A""+trim(BgnCnt+HeadRowCnt+TitleRowCnt+ContentRowCnt)+"":D""+trim(BgnCnt+HeadRowCnt+TitleRowCnt+ContentRowCnt+FootRowCnt-1))" & vbCr & _
" .Font.Size = 9" & vbCr & _
" .Font.Bold = True" & vbCr & _
" .Borders.LineStyle = xlLineStyleNone" & vbCr & _
" .VerticalAlignment = xlCenter" & vbCr & _
" .HorizontalAlignment = xlLeft" & vbCr & _
" .Orientation = xlHorizontal" & vbCr & _
"end With" & vbCr & _
"PageNo=PageNo+1" & vbCr & _
"BgnCnt=BgnCnt+PageRowCnt" & vbCr & _
"loop" & vbCr & _
"With Sheet1.PageSetup" & vbCr & _
" .HeaderMargin = application.CentimetersToPoints(0)" & vbCr & _
" .LeftMargin = application.CentimetersToPoints(2)" & vbCr & _
" .RightMargin =application.CentimetersToPoints(2)" & vbCr & _
" .TopMargin = application.CentimetersToPoints(1)" & vbCr & _
" .BottomMargin = application.CentimetersToPoints(1)" & vbCr & _
" .FooterMargin = application.CentimetersToPoints(0)" & vbCr & _
"' .Orientation = xlLandscape" & vbCr & _
" .Orientation = xlPortrait" & vbCr & _
" .CenterHorizontally = True" & vbCr & _
" .CenterVertically = False" & vbCr & _
" .PaperSize = xlPaperA4" & vbCr & _
"End With" & vbCr & _
"Range(""A1"").Select" & vbCr & _
"end sub"
xlmodule.CodeModule.AddFromString (strCode)
xlApp.Run "MyMacro"
end sub
</script>