The following macro was written to append the Template/document 'NMRS Superbill 2009' to the current document. However, tabs, font size, field size and relative positioning of textboxes are not maintained. Sorry, but I do not know about styles. Any additional code that will make this bullet-proof?
[Sub AddBill()
'
' AddBill Macro
'
'
Selection.InsertBreak Type:=wdSectionBreakNextPage
With Selection.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(0.5)
.BottomMargin = InchesToPoints(0.5)
.LeftMargin = InchesToPoints(0.25)
.RightMargin = InchesToPoints(0.17)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(11)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = True
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = True
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With
Selection.InsertFile FileName:="C:\Documents and Settings\Administrator\Application Data\Microsoft\Templates\NMRS Superbill Final 2009.dot", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Sub]
Thanks for any help you can provide.
krose
[Sub AddBill()
'
' AddBill Macro
'
'
Selection.InsertBreak Type:=wdSectionBreakNextPage
With Selection.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = InchesToPoints(0.5)
.BottomMargin = InchesToPoints(0.5)
.LeftMargin = InchesToPoints(0.25)
.RightMargin = InchesToPoints(0.17)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.PageWidth = InchesToPoints(8.5)
.PageHeight = InchesToPoints(11)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = True
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = True
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With
Selection.InsertFile FileName:="C:\Documents and Settings\Administrator\Application Data\Microsoft\Templates\NMRS Superbill Final 2009.dot", Range:="", _
ConfirmConversions:=False, Link:=False, Attachment:=False
End Sub]
Thanks for any help you can provide.
krose