T
Ted
This may seem like kind of an unusual request but from Access i create a
word document on the fly...
On Error GoTo notloaded
Set objWord = GetObject(, "Word.Application")
notloaded:
If Err.Number = 429 Then
Set objWord = CreateObject("Word.Application")
End If
objWord.Visible = True
objWord.Documents.Open
FileName:="L:\StateNational\Decs\CommPkgDecTemplate.doc"
objWord.ActiveDocument.Sections.PageSetup.LeftMargin = 30
objWord.ActiveDocument.Sections.PageSetup.RightMargin = 30
objWord.ActiveDocument.Sections.PageSetup.TopMargin = 30
objWord.ActiveDocument.Sections.PageSetup.BottomMargin = 30
objWord.selection.font.Name = "Arial"
objWord.selection.font.Size = 12
objWord.selection.font.bold = True
objWord.selection.ParagraphFormat.Alignment = 1
objWord.selection.typetext txtPolType & vbCr
objWord.selection.ParagraphFormat.Alignment = 0
objWord.selection.typetext
"__________________________________________________________________________________"
& vbCr
objWord.selection.typetext " "
objWord.selection.font.underline = True
objWord.selection.typetext "Named Insured and Address"
etc.....
at the end of the document I need to automatically add a jpg or bmp
whichever would work. is this possible?
Any help would be very much appreciated.
TIA
Ted
word document on the fly...
On Error GoTo notloaded
Set objWord = GetObject(, "Word.Application")
notloaded:
If Err.Number = 429 Then
Set objWord = CreateObject("Word.Application")
End If
objWord.Visible = True
objWord.Documents.Open
FileName:="L:\StateNational\Decs\CommPkgDecTemplate.doc"
objWord.ActiveDocument.Sections.PageSetup.LeftMargin = 30
objWord.ActiveDocument.Sections.PageSetup.RightMargin = 30
objWord.ActiveDocument.Sections.PageSetup.TopMargin = 30
objWord.ActiveDocument.Sections.PageSetup.BottomMargin = 30
objWord.selection.font.Name = "Arial"
objWord.selection.font.Size = 12
objWord.selection.font.bold = True
objWord.selection.ParagraphFormat.Alignment = 1
objWord.selection.typetext txtPolType & vbCr
objWord.selection.ParagraphFormat.Alignment = 0
objWord.selection.typetext
"__________________________________________________________________________________"
& vbCr
objWord.selection.typetext " "
objWord.selection.font.underline = True
objWord.selection.typetext "Named Insured and Address"
etc.....
at the end of the document I need to automatically add a jpg or bmp
whichever would work. is this possible?
Any help would be very much appreciated.
TIA
Ted