A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Mail merge question



 
 
Thread Tools Display Modes
  #1  
Old October 30th, 2008, 09:56 PM posted to microsoft.public.word.mailmerge.fields
[email protected]
external usenet poster
 
Posts: 9
Default Mail merge question

I am created a large mail merge document with excel as the list
source. Part of the project is to send a different jpg file whose
location on the hard drive is a field in the spreadsheet. Is it
possible to merge these different images into a "picture field" in
the mail merge document
  #3  
Old October 31st, 2008, 08:36 PM posted to microsoft.public.word.mailmerge.fields
[email protected]
external usenet poster
 
Posts: 9
Default Mail merge question

I apologgize for my dumbness

I got the merge to work but only the first image repeats over and over
again. i tried ctrl-a and F9. Hitting alt-f9 shows the correct
fields (that is the names of the proper image is in placebut it is the
same image as the first mail merge document

i am using Office 2007


On Fri, 31 Oct 2008 08:18:07 +0200, "Graham Mayor"
wrote:

See http://www.gmayor.com/mail_merge_graphics.htm


  #5  
Old November 1st, 2008, 09:39 AM posted to microsoft.public.word.mailmerge.fields
[email protected]
external usenet poster
 
Posts: 10
Default Mail merge question

Thanks but as I said I read what you wrote...I did it in the NEW
Doc...could it be Office 2007?

BTW in the Source Doc if I scroll through the preview and hit F9 it
does update but only whenI have clicked on the picture itself. Ctrl-A
F9 does not work. If I triy the same in the NEW doc nothing happes
the image of the first record remains. Does this have any
significants?

On Sat, 1 Nov 2008 09:50:53 +0200, "Graham Mayor"
wrote:

Merge to a new document and in THAT document CTRL+A then F9 to update and
display the correct images.


  #6  
Old November 1st, 2008, 12:43 PM posted to microsoft.public.word.mailmerge.fields
Graham Mayor
external usenet poster
 
Posts: 18,297
Default Mail merge question

Office 2007 does produce some oddities but I have retested this in Word 2007
and CTRL+A then F9 does indeed update the fields here.
Try adding the update macro from http://www.gmayor.com/installing_macro.htm
and see if that will force an update on the merged document.

The pictures displayed in the source document are irrelevant to the process.
I can assume that your field syntax is correct as you can see the picture in
the source document. When the document is merged the Includepicture fields
are translated to include the merge data. So instead of (say)
{ INCLUDEPICTURE "D:\\My Documents\\My Pictures\\{ MERGEFIELD
"PictureName" }" }
the merged document would have
{ INCLUDEPICTURE "D:\\My Documents\\My Pictures\\PictureName.jpg" }
where picturename.jpg is the picture associated with the record.

If you press ALT+F9 when viewing the Merged document that is what you should
see - with a different picturename for each record.

It is this merged document that needs to be updated and in a simnple merge
document there is no reason I can think of why those fields shouldn't be
updated to display the correct files.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



wrote:
Thanks but as I said I read what you wrote...I did it in the NEW
Doc...could it be Office 2007?

BTW in the Source Doc if I scroll through the preview and hit F9 it
does update but only whenI have clicked on the picture itself. Ctrl-A
F9 does not work. If I triy the same in the NEW doc nothing happes
the image of the first record remains. Does this have any
significants?

On Sat, 1 Nov 2008 09:50:53 +0200, "Graham Mayor"
wrote:

Merge to a new document and in THAT document CTRL+A then F9 to
update and display the correct images.



  #7  
Old November 7th, 2008, 04:39 PM posted to microsoft.public.word.mailmerge.fields
PC User
external usenet poster
 
Posts: 67
Default Mail merge question

Maybe this might help.

How to send the current record to Word 2000 with automation

'http://support.microsoft.com/kb/q210271/

Private Sub MergeButton_Click()

On Error GoTo MergeButton_Err

Dim objWord As Word.Application

'Copy the Photo control on the Employees form.
DoCmd.GoToControl "Photo"
DoCmd.RunCommand acCmdCopy

'Start Microsoft Word 97.
Set objWord = CreateObject("Word.Application")

With objWord
'Make the application visible.
.Visible = True

'Open the document.
.Documents.Open ("C:\MyMerge.doc")

'Move to each bookmark and insert text from the form.
.ActiveDocument.Bookmarks("First").Select
.Selection.Text = (CStr(Forms!Employees!FirstName))
.ActiveDocument.Bookmarks("Last").Select
.Selection.Text = (CStr(Forms!Employees!LastName))
.ActiveDocument.Bookmarks("Address").Select
.Selection.Text = (CStr(Forms!Employees!Address))
.ActiveDocument.Bookmarks("City").Select
.Selection.Text = (CStr(Forms!Employees!City))
.ActiveDocument.Bookmarks("Region").Select
.Selection.Text = (CStr(Forms!Employees!Region))
.ActiveDocument.Bookmarks("PostalCode").Select
.Selection.Text = (CStr(Forms!Employees!PostalCode))
.ActiveDocument.Bookmarks("Greeting").Select
.Selection.Text = (CStr(Forms!Employees!FirstName))

'Paste the photo.
.ActiveDocument.Bookmarks("Photo").Select
.Selection.Paste
End With

'Print the document in the foreground so Microsoft Word will not
close
'until the document finishes printing.
objWord.ActiveDocument.PrintOut Background:=False

'Close the document without saving changes.
objWord.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges

'Quit Microsoft Word and release the object variable.
objWord.Quit
Set objWord = Nothing
Exit Sub

MergeButton_Err:
'If a field on the form is empty, remove the bookmark text, and
'continue.
If Err.Number = 94 Then
objWord.Selection.Text = ""
Resume Next

'If the Photo field is empty.
ElseIf Err.Number = 2046 Then
MsgBox "Please add a photo to this record and try again."
Else
MsgBox Err.Number & vbCr & Err.Description
End If

Exit Sub
End Sub

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:20 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.