Access/Vba mail merge to word help
Hi,
I have a couple of issues with a automated mail merge to word from vba. Does anyone know if there is a way to add a variable image field into the word selection, I have tried the 'objWord.Shapes.AddPicture' method and I can only get this to work using a specific image, however I require a different image(signature on letter) for certain records.
Secondly is there a way to insert certain fields in the word selection range into a text box, namely address details to avoid letter drift, because I cannot find a way to add the image in a variable position depending on field population.
I know there are other mail merge methods which could be used but this method is quick and very effective for my requirements (well most of them). Any input would be very much appreciated.
Tq,
'#### current code ####
objWordApp.Application.Visible = True
With objWord.MailMerge.Fields
Set oSel = objWord.Application.Selection
oSel.TypeParagraph
.Add oSel.Range, "contact"
'######### etc
oSel.TypeText "Letter text - bla - bla"
oSel.TypeParagraph
oSel.TypeParagraph
.Add oSel.Range, "signoff"
End With
objWord.MailMerge.Execute
|