View Single Post
  #12   Report Post  
JohnB
 
Posts: n/a
Default

Hi Again.

Ive now had a chance to try out this feature using Access 2002 on XP,
networked, here at work. Ill give a full description of what Im trying to do
and what is happening but I feel that I now need to ask exactly what the
field code should look like for my particular case. Word changes the merge
field code I enter, whenever I save.

Heres the set up. I have a sample Access 2002 database, with a query
containg three fields, StudentID, StudentName and ImagePathAndFile. I have
three records in the table feeding this query, containg the following. The
query selects all three records.

1 Fred First U:\Personal\MVC-002S.JPG
2 Jim Second H:\Images\MVC-003S.JPG
3 Ed Third U:\Personal\BlackAndWhite.JPG

Next, I open a blank Word document and merge it to the query. I insert the
field StudentName and can see it on the main and merged documents. Next I put
in the code to add the pictures.

I 'think' that the following is what I should enter as the complete field
code, but its behaving oddly.

{ IncludePicture " {MERGEFIELD "ImagePathAndFile" \ * upper } " }

I put this in, then highlight it and use Update Field, then I can
successfully use Alt F9 to toggle the field code on and off. With it off, I
can see a picture but its the same picture on all three records in the Main
document. If I go to record two, highlight the picture and choose Update
Field, then the picture changes to that records picture and that same picture
is now shown for all three records. When I merge to a new document, whichever
picture was selected at the Update Field stage, is shown on all three merged
pages. I.e. individual records pictures are not being shown. If I use Ctrl A
and Update Field, nothing changes. Now for the interesting bit. I close the
merged document and save the main document, then reopen it. Now the field
code shows as:

{INCLUDEPICTURE "MVG-002S.JPG%20" \ * MERGEFORMATINET"}

When I use Alt F9, the same picture shows in each record but when I
highlight it and use Update Field, it doesnt change. Also, when I merge to a
new document, the same picture shows on all pages.

OK Im probably doing something very stupid, so please put me out of my
misery. Is my picture merge field code even remotely correct? If not, what
should it be and why is Word changing the code when I save?

Many thanks for any help you can give. Cheers, JohnB



"Peter Jamieson" wrote:

Yes.

Peter Jamieson

"JohnB" wrote in message
...
Hi Peter and Anne.

A big big apology - yes youre right, I read Alt F9 when you clearly said
Ctrl F9. I can now get the { } symbols. Ill have to leave it there for the
moment. Please keep an eye on this thread and Ill let you know how I get
on.
(Im not quite sure what Cyndy means by Mergefield Signature in her code.
Is
Signature the name of the field holding the path to the image? So, if my
fieldname is Image, I put Mailmerge Image in the code?


Thanks for all the help, JohnB


Peter Jamieson wrote in message
...
Let's just make sure we're talking aboutt he same things he
Alt-F9 switches between field "codes" view (where you should see e.g.


MERGEFIELD FamilyName }) and Field "results" view (where you see the data

or
FamilyName depending on whether you clicked the abc button in the
merge toolbar.
F9 normally just re-executes any selected fields
ctrl-F9 inserts a blank field, i.e. { }

The same key combinations were used in Word 97.

It's possible that some of these key combinations have been reassigned on
your copy of Word.ctrl-F9 - you should be able to check using
Tools|Customize|keyboard, select All Commands in the left-hand column,

then
select InsertFieldCodes in the other list. See if ctrl-F9 is shown as the
shortcut combination.If it isn't, it could be for a good reason (e.g.
some
addin you use all the time may use it), so I would check before assigning
ctrl-F9 to this function again. As a workaround, you can go back to the
opening pane of the Tools|Customize dialog, select Commands, select

category
All Commands, find InsertFieldCodes and drag it to a toolbar or menu.

If ctrl-F9 hasn't been re-assigned, not sure what is going wrong but

another
workaround would be to cut/paste an existing field and change the

contents.

Peter Jamieson



"JohnB" wrote in message
...
Hi Peter.

Sorry but this does not work for me. Im using Access 97 and Word 97 if
that
matters. I tried this in an existing merge document, then in a brand

new
Word document that I merged with a data source.

Before inserting any merge fields from the source, I tried Alt F9 -
nothing
appeared. I then inserted one merge field. Using F9 alternately changes
the
merge field from FamilyName to {FamilyName} but I cant get { } to
appear on their own.

Any further ideas?

Thanks for the help, JohnB

Peter Jamieson wrote in message
...
You have to use ctrl-F9 to insert the special filed code braces -
{ } -
used
in Word. All the rest of the text can be typed or pasted in the usual
way.

e.g. in a Word document, press ctrl-F9.
You see { }.
Type INCLUDEPICTURE "C:\\Data\\Pics\\" inside the { }
You see { INCLUDEPICTURE "C:\\Data\\Pics\\" }
Putt he insertion point before the last " and press ctrl-F9.
You see { INCLUDEPICTURE "C:\\Data\\Pics\\{ }" }
Type Mergefield Signature \*upper inside the new { }
You see { INCLUDEPICTURE "C:\\Data\\Pics\\{ Mergefield Signature
\*upper }" }

Peter Jamieson


"JohnB" wrote in message
...
Hi.

Im trying to mail merge an Image, whose path is stored in an Access
2002
mdb
field and Ive seen a previous post mentioning MVP Cindy Meister's
website.
Ive also had a look at Word Help on Include Picture. But I cant get

it
to
work.

The main problem seems to be that I am unable to get the actual
merge
code
to appear so that I can edit it. Cindy suggests the following:

Reference the graphic file information by nesting the merge field in

an
IncludePicture field.
Example: { IncludePicture "C:\\Data\\Pics\\{ Mergefield Signature \*
upper }" }

How do I get her example code to appear in the document so that can
edit
it?
Ive tried cutting and pasting her code but that doesnt work. Ive

tried
using
Insert\Ptcture\FromFile with Link To File checked but this only gets

an
image to appear - I cant see the code to edit it so that I can

include
the
path.

What am I doing wrong?

Thanks for any help, JohnB