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  

IncludePicture - File extensions



 
 
Thread Tools Display Modes
  #1  
Old May 4th, 2004, 02:54 PM
NickH
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Hi

I have a word template with the following Expression

{Includepicture "{MERGEFIELD Description}"\d}
When the Mergefield is updated the corresponding string
is displayed. C:\\Temp\\plt1.wmf"\d}

This works fine, I have a table with a
field "Description" within Access which holds the
information on retrieving the Graphics image from its
location, which is does correctly.

What I would like to do if it is possible is to add/store
to this table other descriptions of different file
formats i.e jpg format. Then using another template using
something very similar to the expression given above is
to extract only those graphic images with the "jpg"
format.

Therefore, I would have two templates one for "Wmf"
images to be merged, and the second template for
the "jpg" images to be merged.

If this is possibly, the one alternative is to have a
separate table in Access for holding the names and path
for the "jpg" images.

Any help would be most appreciated.


Tks

Nick
  #2  
Old May 5th, 2004, 08:40 AM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Hi NickH,

I'm not sure I'm following you correctly...

are you basically asking whether you can do something like
this:

{ IncludePicture "{ Mergefield PathToGrafik }.jpg" \d }

IOW, have the graphic extension independent of the rest of
the graphic path and name?

The answer is YES.

I have a word template with the following Expression

{Includepicture "{MERGEFIELD Description}"\d}
When the Mergefield is updated the corresponding string
is displayed. C:\\Temp\\plt1.wmf"\d}

This works fine, I have a table with a
field "Description" within Access which holds the
information on retrieving the Graphics image from its
location, which is does correctly.

What I would like to do if it is possible is to add/store
to this table other descriptions of different file
formats i.e jpg format. Then using another template using
something very similar to the expression given above is
to extract only those graphic images with the "jpg"
format.

Therefore, I would have two templates one for "Wmf"
images to be merged, and the second template for
the "jpg" images to be merged.

If this is possibly, the one alternative is to have a
separate table in Access for holding the names and path
for the "jpg" images.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

  #3  
Old May 5th, 2004, 01:22 PM
NickH
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Hi Cindy

Yes you are correct.

I have tried several expressions as the one given below
but without much success.

I have a table in access with two fields
with the following information

Number Description
1 C:\Temp\plt1.wmf
2 c:\temp\plt2.wmf
3 C:\temp\photo1.jpg
4 C:\temp\photo2.jpg

The general idea is to use two templates with appropriate
expressions to merge the specific Graphics image using
one table with access as shown above.

At the present time all I have been able to achieve is
merging both "Wmf" and "jpg" graphic images to the same
new word document(Catalogue).

So any help here I would be most appreciated.


tks

Nick
-----Original Message-----
Hi NickH,

I'm not sure I'm following you correctly...

are you basically asking whether you can do something

like
this:

{ IncludePicture "{ Mergefield PathToGrafik }.jpg" \d }

IOW, have the graphic extension independent of the rest

of
the graphic path and name?

The answer is YES.

I have a word template with the following Expression

{Includepicture "{MERGEFIELD Description}"\d}
When the Mergefield is updated the corresponding

string
is displayed. C:\\Temp\\plt1.wmf"\d}

This works fine, I have a table with a
field "Description" within Access which holds the
information on retrieving the Graphics image from its
location, which is does correctly.

What I would like to do if it is possible is to

add/store
to this table other descriptions of different file
formats i.e jpg format. Then using another template

using
something very similar to the expression given above

is
to extract only those graphic images with the "jpg"
format.

Therefore, I would have two templates one for "Wmf"
images to be merged, and the second template for
the "jpg" images to be merged.

If this is possibly, the one alternative is to have a
separate table in Access for holding the names and

path
for the "jpg" images.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update

Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-

mail
:-)

.

  #4  
Old May 6th, 2004, 02:47 PM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Hi NickH,

I'm not really clear on everything, but if the following
information is what's coming across from the database, then
you have one major problem: the IncludePicture field
expects *double backslashes*. I'd expect you to be getting
error messages in the mail merge result document given the
data you list below.

I have tried several expressions as the one given below
but without much success.

I have a table in access with two fields
with the following information

Number Description
1 C:\Temp\plt1.wmf
2 c:\temp\plt2.wmf
3 C:\temp\photo1.jpg
4 C:\temp\photo2.jpg


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

  #5  
Old May 7th, 2004, 09:15 AM
NickH
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Cindy

I have got the expression to work, by doing a merge and
then an Up-date I obtain all the graphic images into the
new document, expression given he

{IncludePicture "{MERGEFIELD File}"/d}

If I toggle on {MERGEFIELD File}, the path and file look
like this

S:\\R&D\\EMC\\Product - Project Test\\icon\\Statoil
Kristin\\plt1.wmf

Therefore everything works, ok

My only question was the tabel in Access I use for the
Graphic images contains two types "wmf" and "Jpg", I was
wondering if it is possible to use a modified expression
which will allow me to pull out and merge into a merge
document one of the specified types of images. Therefore
I could have two templates, one for producing a document
with the "Wmf" images and the other template to produce a
document with the "Jpg" images.

Tks

nick
-----Original Message-----
Hi NickH,

I'm not really clear on everything, but if the following
information is what's coming across from the database,

then
you have one major problem: the IncludePicture field
expects *double backslashes*. I'd expect you to be

getting
error messages in the mail merge result document given

the
data you list below.

I have tried several expressions as the one given

below
but without much success.

I have a table in access with two fields
with the following information

Number Description
1 C:\Temp\plt1.wmf
2 c:\temp\plt2.wmf
3 C:\temp\photo1.jpg
4 C:\temp\photo2.jpg


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Sep 30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-

mail
:-)

.

  #6  
Old May 7th, 2004, 03:49 PM
Cindy M -WordMVP-
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Hi NickH,

Ummmm. OK, on re-reading this for the fourth time, I think
I'm finally following what you're asking. Chalk it up to the
intensive VB.NET course I've been immersed in for the last
three weeks :-) Sorry about being so dense!

If this is all one field, and you don't want to add an
additional field to carry just that information, then you're
going to need QUERY expressions. Word fields don't have any
string manipulation capability, to speak of; and what little
they have is relatively complicated to set up.

What you'll do in the query expression is look at the last
four characters of the field content, and check if they
match *.wmf, or *.jpg, respectively. (You need to queries,
one for each type).

Set up a new query and take across all the fields you need
for the mail merge.

Now, in the first empty column, in the top row, enter the
expression, using this pattern:

ColumnHeading: Right([FieldName], 4)

Where ColumnHeading is the field name you'll see in the mail
merge setup and FieldName is the name of the field holding
the path to the graphics file.

In the "Criteria" row, type .wmf resp. .jpg

My only question was the tabel in Access I use for the
Graphic images contains two types "wmf" and "Jpg", I was
wondering if it is possible to use a modified expression
which will allow me to pull out and merge into a merge
document one of the specified types of images. Therefore
I could have two templates, one for producing a document
with the "Wmf" images and the other template to produce a
document with the "Jpg" images.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)

  #7  
Old May 17th, 2004, 03:03 PM
NickH
external usenet poster
 
Posts: n/a
Default IncludePicture - File extensions

Hello Cindy

I am a little bit late replying back to you,
reason being other work has stopped me looking at this
problem.
I will certainly try as you have suggested, I am also
very grateful for your patience and time.

tks

Nick
-----Original Message-----
Hi NickH,

Ummmm. OK, on re-reading this for the fourth time, I

think
I'm finally following what you're asking. Chalk it up to

the
intensive VB.NET course I've been immersed in for the

last
three weeks :-) Sorry about being so dense!

If this is all one field, and you don't want to add an
additional field to carry just that information, then

you're
going to need QUERY expressions. Word fields don't have

any
string manipulation capability, to speak of; and what

little
they have is relatively complicated to set up.

What you'll do in the query expression is look at the

last
four characters of the field content, and check if they
match *.wmf, or *.jpg, respectively. (You need to

queries,
one for each type).

Set up a new query and take across all the fields you

need
for the mail merge.

Now, in the first empty column, in the top row, enter

the
expression, using this pattern:

ColumnHeading: Right([FieldName], 4)

Where ColumnHeading is the field name you'll see in the

mail
merge setup and FieldName is the name of the field

holding
the path to the graphics file.

In the "Criteria" row, type .wmf resp. .jpg

My only question was the tabel in Access I use for the
Graphic images contains two types "wmf" and "Jpg", I

was
wondering if it is possible to use a modified

expression
which will allow me to pull out and merge into a merge
document one of the specified types of images.

Therefore
I could have two templates, one for producing a

document
with the "Wmf" images and the other template to

produce a
document with the "Jpg" images.


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update

Sep
30 2003)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-

mail
:-)

.

 




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 02:29 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.