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  

Help to merge Image (Doug Robins?)



 
 
Thread Tools Display Modes
  #21  
Old June 23rd, 2005, 05:19 PM
JohnB
external usenet poster
 
Posts: n/a
Default

Thanks for such a comprehensive reply.

I dont have the knowledge to allow me to do the things you suggest so I
think Ill just have to accept that I cant merge Images in the way I want to.
Still, it was interesting. I know a lot more about mail merge than I did at
the start.

Thank you for all of your help and for being patient.

Cheers, JohnB

"Peter Jamieson" wrote:

You are right about the doubling up of backslashes, and you may also need to
know that if you are using a UNC pathname where you would have
\\computername\sharename\filename.ext, you would need four backslashes
before the computername.

of adjusting the merge field code to cater for paths with only single \ ?


Not as far as I know. The only ways I know how to do it are to fix your
data source in one way or another, to use the Word Mail Merge Events in Word
2002/2003 to process the pathnames and insert them using, say, a DOCPROPERTY
field, or fix the pathnames after the merge, perhaps also using VBA.

In the case of an Access DB fixing the pathnames would typically mean:
a. you change the way the paths are stored in the first place, which may of
course have many knock-on effects on other applications, and it may not be
possible if you are not maintaining the data
b. you add a field to the appropriate table(s) and maintain a
double-backslashed version of the same data, perhaps adding a step before
the merge to fix all the data. or maybe you create a new table to do that
c. you try to create a formula in a query that doubles up the backslashes
for you "on-the-fly", and use that query as the data source for your merge.
Unfortunately, to do that, you either have to
- consider using the replace function in the query. Off the top of my head
ISTR that that particular function requires that you know how many replaces
you might need to do.
- use an Access VBA function. But that will require that you connect to
your Access database using DDE.

So no points for whoever didn't just make it very easy to insert pictures
from a merge in the first place...

Peter Jamieson

"JohnB" wrote in message
...
Thanks Peter and yet again, sorry.

OK. Done that and played around further. Ive now got it to work, sort of.
Ive discovered that this only works if the path stored in field
ImagePathAndFile contains double \ characters between path folders, like
this:

U:\\Personal\\MVC-002S.JPG

It will not show individual pictures for each record if just single \
symbols are used - it shows the first picture for all records. Is there a
way
of adjusting the merge field code to cater for paths with only single \ ?

Just to repeat, Im using the following:

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

Thanks again for sticking with me on this. JohnB


"Peter Jamieson" wrote:

Hi John,

It should be /un/checked.

Peter Jamieson
"JohnB" wrote in message
...
Hi Peter.
Ive looked at that and the box is already checked. Where do I go from
here?
Is my merge code correct? (I think not). Why is it being converted on
save?
Unless I can get an answer to these questions I think Im at a dead end.

Thanks, JohnB

"Peter Jamieson" wrote:

Unfortunately there's yet another thing to do in this case - go into
Word
Tools|options|General|Web Options|Files and uncheck "Update links on
save".
Although in my opinion this setting should not affect documents that
you
are
saving as .doc, not .htm(l), it does.

Peter Jamieson


"JohnB" wrote in message
...
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.

  #22  
Old June 23rd, 2005, 05:28 PM
Peter Jamieson
external usenet poster
 
Posts: n/a
Default

You don't need it. It just changes the case of the text to upper case.

Peter Jamieson
"Bob K" wrote in message
...
Sorry I didn't see the coding didn't paste.
{ INCLUDEPICTURE c:\\cbs\\pubpics\\{ MERGEFIELD "PicRef" \* upper }.jpg}
by the way what dose the [ \ * upper ] refer to?
--
All the Best
Bob K


"Bob K" wrote:

Hi folks
I have been following your discussion intensely since yesterday afternoon
to
22/6/05 when I started to do the same exercise. I think you've already
cracked it. The coding I'm using is and that is using just a straight
reference code in the worksheet all the extensions are in the merge
field.
What you have to do is merge to a new document or your pages press Ctrl+A
to
select all the fields and then press F9 to update all the fields you will
now
find that your pictures are in the right place. I'm working with office
word
2003 and Excel I am assuming this is going to work with the earlier
versions
that you're working with. This is fine if you've got a picture for each
page
otherwise it appears to default to the picture that was there before the
mail
merge. My thought to get around this is possibly set up the mail merge
with a
dummy image saying no PICTURE AVAILABLE unless anybody has a better
suggestion.
I thank you all for your help it has been very interesting and I'll keep
watching this space.

--
All the very Best
Bob K


"Peter Jamieson" wrote:

You are right about the doubling up of backslashes, and you may also
need to
know that if you are using a UNC pathname where you would have
\\computername\sharename\filename.ext, you would need four backslashes
before the computername.

of adjusting the merge field code to cater for paths with only single
\ ?

Not as far as I know. The only ways I know how to do it are to fix
your
data source in one way or another, to use the Word Mail Merge Events in
Word
2002/2003 to process the pathnames and insert them using, say, a
DOCPROPERTY
field, or fix the pathnames after the merge, perhaps also using VBA.

In the case of an Access DB fixing the pathnames would typically mean:
a. you change the way the paths are stored in the first place, which
may of
course have many knock-on effects on other applications, and it may not
be
possible if you are not maintaining the data
b. you add a field to the appropriate table(s) and maintain a
double-backslashed version of the same data, perhaps adding a step
before
the merge to fix all the data. or maybe you create a new table to do
that
c. you try to create a formula in a query that doubles up the
backslashes
for you "on-the-fly", and use that query as the data source for your
merge.
Unfortunately, to do that, you either have to
- consider using the replace function in the query. Off the top of my
head
ISTR that that particular function requires that you know how many
replaces
you might need to do.
- use an Access VBA function. But that will require that you connect
to
your Access database using DDE.

So no points for whoever didn't just make it very easy to insert
pictures
from a merge in the first place...

Peter Jamieson

"JohnB" wrote in message
...
Thanks Peter and yet again, sorry.

OK. Done that and played around further. Ive now got it to work, sort
of.
Ive discovered that this only works if the path stored in field
ImagePathAndFile contains double \ characters between path folders,
like
this:

U:\\Personal\\MVC-002S.JPG

It will not show individual pictures for each record if just single \
symbols are used - it shows the first picture for all records. Is
there a
way
of adjusting the merge field code to cater for paths with only single
\ ?

Just to repeat, Im using the following:

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

Thanks again for sticking with me on this. JohnB


"Peter Jamieson" wrote:

Hi John,

It should be /un/checked.

Peter Jamieson
"JohnB" wrote in message
...
Hi Peter.
Ive looked at that and the box is already checked. Where do I go
from
here?
Is my merge code correct? (I think not). Why is it being
converted on
save?
Unless I can get an answer to these questions I think Im at a dead
end.

Thanks, JohnB

"Peter Jamieson" wrote:

Unfortunately there's yet another thing to do in this case - go
into
Word
Tools|options|General|Web Options|Files and uncheck "Update links
on
save".
Although in my opinion this setting should not affect documents
that
you
are
saving as .doc, not .htm(l), it does.

Peter Jamieson


"JohnB" wrote in message
...
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.



 




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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail merge - how to stop SQL msg on merged docs J_Gold New Users 1 May 10th, 2005 05:04 AM
mail merge with attachments AS Mailmerge 3 December 21st, 2004 04:11 AM
Mail merge conversion from Word to .NET code. mutton Mailmerge 1 November 17th, 2004 02:09 AM
Image Control Table John Gavin General Discussion 3 June 28th, 2004 04:21 AM
Merge to Fax with SBS/Exchange? Tom Mailmerge 3 May 18th, 2004 11:22 PM


All times are GMT +1. The time now is 06:32 PM.


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