VBA Generate Word Doc

Sub ch8_generateWordDoc()
'enable Microsoft Word 14.0 Object Library
Dim wrdDoc As Word.Document
Dim ii As Integer
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True
Set wrdDoc = wrdApp.Documents.Add
Dim Box As Shape
With wrdDoc
Dim SrcePath As String
' Set header of doc
Dim HdrText As String
Dim BoldRange As Range
Dim HdrRange As Range
Set docActive = Word.ActiveDocument
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.text = " VBA-Market | www.vba-market.com | New York, NY 10282 "
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Bold = True
'ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.InlineShapes.AddPicture "Z:\My Documents\My Pictures\logo.JPG"
docActive.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
ActiveDocument.Paragraphs(1).Range.InlineShapes.AddHorizontalLineStandard
.Content.InsertParagraphAfter .Content.InsertAfter "" .Content.InsertAfter Date .Content.InsertParagraphAfter .Content.InsertParagraphAfter .Content.InsertAfter a1 .Content.InsertParagraphAfter .Content.InsertAfter a2 .Content.Style = .Styles("No Spacing") .Content.InsertParagraphAfter .Content.InsertAfter "Dear Client," .Content.InsertParagraphAfter .Content.InsertAfter "" .Content.InsertParagraphAfter .Content.InsertAfter "Thank you for purchasing VBA Handbook. Are you ready to become a VBA Subject Matter Expert? In this book you will learn the following:" .Content.InsertParagraphAfter .Content.InsertAfter "" .Content.InsertParagraphAfter .Content.InsertAfter "" Set objRange = wrdDoc.Content objRange.Collapse Direction:=wdCollapseEnd intNoOfRows = 10 intNoOfColumns = 2 wrdDoc.Tables.Add objRange, intNoOfRows, intNoOfColumns Set objTable = wrdDoc.Tables(1) objTable.Borders.Enable = True objTable.Cell(1, 1).Range.text = "Chapter" objTable.Cell(1, 1).Range.Bold = True objTable.Cell(1, 2).Range.text = "Topic" objTable.Cell(1, 2).Range.Bold = True objTable.Cell(2, 1).Range.text = "1" objTable.Cell(2, 2).Range.text = "Basic" objTable.Cell(3, 1).Range.text = "2" objTable.Cell(3, 2).Range.text = "Calculations" objTable.Range.ParagraphFormat.Alignment = wdAlignParagraphCenter .Content.InsertParagraphAfter .Content.InsertAfter "Note: If you get stuck on anything please email info@vba-market.com and we'll help you out." .Content.InsertParagraphAfter .Content.InsertParagraphAfter .Content.InsertAfter "" .Content.InsertAfter "Sincerely," .Content.InsertParagraphAfter .Content.InsertAfter "VBA-Market"
.PageSetup.LeftMargin = InchesToPoints(0.5)
.PageSetup.RightMargin = InchesToPoints(0.5)
.Range.Font.Name = "Arial Narrow"
.Range.Font.Size = "10"
End With
End Sub