INSERTING A JPG INTO A WORD DOC FROM ACCESS

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
 
L

Lars Brownies

Try to create a macro in Word and record the action you need. Then look at
the code behind the macro.

Lars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top