Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

I am now trying to use the INCLUDEPICTURE field to insert pictures into my
mail merge document. I would like to be able to merge pictures into the
document that are in the same folder as the main document. Here is what I
have tried and seen.

I have successfully merged the pictures by using the entire path to the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \* MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
locations::documents) as the path for the merged files. I know this because
I have moved some of the pictures into the DOCUMENTS path folder and only the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find nothing the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main) document.

So now, here I am again, asking how to accomplish what seems like a simple
task (merge the pictures in the current folder into my document) that I can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default More stupid INCLUDEPICTURE questions

Hi LAR,

Word doesn't really support that. However, if you run the following 'ResetPaths' macro against the merged output, it will update all
the paths for you:

Option Explicit
Dim TrkStatus As Boolean ' Track Changes flag

Private Sub ResetPaths()
' This routine runs whenever the document is opened.
' It calls on the others to do the real work.
' Prepare the environment.
Call MacroEntry
' Make sure the document has been saved, so that it has a valid path
If ActiveDocument.Saved = False then ActiveDocument.Save
' Most of the work is done by this routine.
Call UpdateFields
ActiveDocument.Save
' Go to the start of the document
Selection.HomeKey Unit:=wdStory
' Clean up and exit.
Call MacroExit
End Sub

Private Sub MacroEntry()
' Store current Track Changes status, then switch off temporarily.
With ActiveDocument
TrkStatus = .TrackRevisions
.TrackRevisions = False
End With
' Turn Off Screen Updating temporarily.
Application.ScreenUpdating = False
End Sub

Private Sub MacroExit()
' Restore original Track Changes status
ActiveDocument.TrackRevisions = TrkStatus
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

Private Sub UpdateFields()
' This routine sets the new path for external links.
Dim oRange As Word.Range
Dim oField As Word.Field
Dim OldPath As String
Dim NewPath As String
' Set the new path
NewPath = Replace$(ActiveDocument.Path, "\", "\\")
' Go through all story ranges in the document, including shapes,
' headers & footers.
For Each oRange In ActiveDocument.StoryRanges
' Go through the fields in the story range.
For Each oField In oRange.Fields
With oField
' Process IncludePicture fields only
If .Type = wdFieldIncludePicture Then
' Alternatively process all fields that have links to external files
' If Not .LinkFormat Is Nothing Then
' Get the old path
OldPath = Replace(.LinkFormat.SourcePath, "\", "\\")
' Replace the link to the external file
.Code.Text = Replace(.Code.Text, OldPath, NewPath)
End If
End With
Next oField
Next oRange
End Sub

Amongst other things, the macro gives feedback on its progress. If you look through the code, you'll see that it only acts on
IncludePicture fields, but has commented-out code you could use instead to process all fields that have links to external files.

Cheers

--
macropod
[MVP - Microsoft Word]


"LAR" wrote in message ...
| I am now trying to use the INCLUDEPICTURE field to insert pictures into my
| mail merge document. I would like to be able to merge pictures into the
| document that are in the same folder as the main document. Here is what I
| have tried and seen.
|
| I have successfully merged the pictures by using the entire path to the
| picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
| "current folder" to merge the pictures from.
|
| I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \* MERGEFORMAT}
| only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
| locations::documents) as the path for the merged files. I know this because
| I have moved some of the pictures into the DOCUMENTS path folder and only the
| pictures that I move there appear in the merged document.
|
| I tried to use a relative path with things like {INCLUDE PICTURE
| "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
|
| I've looked at all the VBA examples for AutoOpen but could find nothing the
| TEMPORAIRLY changed the DOCUMENTS path to that of the source (main) document.
|
| So now, here I am again, asking how to accomplish what seems like a simple
| task (merge the pictures in the current folder into my document) that I can't
| seem to figure out for myself.
|
| Thanks in advance for any thoughts for ideas.
|
| LAR


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

Cool! Thanks. I'll give it a try.

Is there a way with a macro to temporarily change the Active Document path
(tools:ptions::file locations::documents)? Seems like that would be
easier. But then what do I know.

"macropod" wrote:

Hi LAR,

Word doesn't really support that. However, if you run the following 'ResetPaths' macro against the merged output, it will update all
the paths for you:

Option Explicit
Dim TrkStatus As Boolean ' Track Changes flag

Private Sub ResetPaths()
' This routine runs whenever the document is opened.
' It calls on the others to do the real work.
' Prepare the environment.
Call MacroEntry
' Make sure the document has been saved, so that it has a valid path
If ActiveDocument.Saved = False then ActiveDocument.Save
' Most of the work is done by this routine.
Call UpdateFields
ActiveDocument.Save
' Go to the start of the document
Selection.HomeKey Unit:=wdStory
' Clean up and exit.
Call MacroExit
End Sub

Private Sub MacroEntry()
' Store current Track Changes status, then switch off temporarily.
With ActiveDocument
TrkStatus = .TrackRevisions
.TrackRevisions = False
End With
' Turn Off Screen Updating temporarily.
Application.ScreenUpdating = False
End Sub

Private Sub MacroExit()
' Restore original Track Changes status
ActiveDocument.TrackRevisions = TrkStatus
' Restore Screen Updating
Application.ScreenUpdating = True
End Sub

Private Sub UpdateFields()
' This routine sets the new path for external links.
Dim oRange As Word.Range
Dim oField As Word.Field
Dim OldPath As String
Dim NewPath As String
' Set the new path
NewPath = Replace$(ActiveDocument.Path, "\", "\\")
' Go through all story ranges in the document, including shapes,
' headers & footers.
For Each oRange In ActiveDocument.StoryRanges
' Go through the fields in the story range.
For Each oField In oRange.Fields
With oField
' Process IncludePicture fields only
If .Type = wdFieldIncludePicture Then
' Alternatively process all fields that have links to external files
' If Not .LinkFormat Is Nothing Then
' Get the old path
OldPath = Replace(.LinkFormat.SourcePath, "\", "\\")
' Replace the link to the external file
.Code.Text = Replace(.Code.Text, OldPath, NewPath)
End If
End With
Next oField
Next oRange
End Sub

Amongst other things, the macro gives feedback on its progress. If you look through the code, you'll see that it only acts on
IncludePicture fields, but has commented-out code you could use instead to process all fields that have links to external files.

Cheers

--
macropod
[MVP - Microsoft Word]


"LAR" wrote in message ...
| I am now trying to use the INCLUDEPICTURE field to insert pictures into my
| mail merge document. I would like to be able to merge pictures into the
| document that are in the same folder as the main document. Here is what I
| have tried and seen.
|
| I have successfully merged the pictures by using the entire path to the
| picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
| "current folder" to merge the pictures from.
|
| I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \* MERGEFORMAT}
| only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
| locations::documents) as the path for the merged files. I know this because
| I have moved some of the pictures into the DOCUMENTS path folder and only the
| pictures that I move there appear in the merged document.
|
| I tried to use a relative path with things like {INCLUDE PICTURE
| "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
|
| I've looked at all the VBA examples for AutoOpen but could find nothing the
| TEMPORAIRLY changed the DOCUMENTS path to that of the source (main) document.
|
| So now, here I am again, asking how to accomplish what seems like a simple
| task (merge the pictures in the current folder into my document) that I can't
| seem to figure out for myself.
|
| Thanks in advance for any thoughts for ideas.
|
| LAR



  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures into my
mail merge document. I would like to be able to merge pictures into the
document that are in the same folder as the main document. Here is what I
have tried and seen.

I have successfully merged the pictures by using the entire path to the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \* MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
locations::documents) as the path for the merged files. I know this
because
I have moved some of the pictures into the DOCUMENTS path folder and only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a simple
task (merge the pictures in the current folder into my document) that I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR



  #5   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

Peter,

Thanks for the help. This is more what I was looking for. Seems like it
should work. I have changed my INCLUDEPICTURE to your syntax below, and
while the syntax works the pictures still load from the DOCUMENTS path in
toolsptions:files locations:documents. ???? It almost seems like I have
some basic setting wrong that is making the INCLUDEPICTURE use that DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures into my
mail merge document. I would like to be able to merge pictures into the
document that are in the same folder as the main document. Here is what I
have tried and seen.

I have successfully merged the pictures by using the entire path to the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \* MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
locations::documents) as the path for the merged files. I know this
because
I have moved some of the pictures into the DOCUMENTS path folder and only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a simple
task (merge the pictures in the current folder into my document) that I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR






  #6   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default More stupid INCLUDEPICTURE questions

Hi Peter,

That works too. Neat trick!

Cheers

--
macropod
[MVP - Microsoft Word]


"Peter Jamieson" wrote in message ...
| Worth trying the following, just in case...
|
| { INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }
|
| But
| a. although it appears to work here these sorts of construct make me
| nervous
| b. you may have to uncheck Word Tools|Options|General|"Web
| options"|Files|"Update links on save"
|
| Peter Jamieson
| "LAR" wrote in message
| ...
| I am now trying to use the INCLUDEPICTURE field to insert pictures into my
| mail merge document. I would like to be able to merge pictures into the
| document that are in the same folder as the main document. Here is what I
| have tried and seen.
|
| I have successfully merged the pictures by using the entire path to the
| picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
| "current folder" to merge the pictures from.
|
| I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \* MERGEFORMAT}
| only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
| locations::documents) as the path for the merged files. I know this
| because
| I have moved some of the pictures into the DOCUMENTS path folder and only
| the
| pictures that I move there appear in the merged document.
|
| I tried to use a relative path with things like {INCLUDE PICTURE
| "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
|
| I've looked at all the VBA examples for AutoOpen but could find nothing
| the
| TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
| document.
|
| So now, here I am again, asking how to accomplish what seems like a simple
| task (merge the pictures in the current folder into my document) that I
| can't
| seem to figure out for myself.
|
| Thanks in advance for any thoughts for ideas.
|
| LAR
|
|


  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems like it
should work. I have changed my INCLUDEPICTURE to your syntax below, and
while the syntax works the pictures still load from the DOCUMENTS path in
toolsptions:files locations:documents. ???? It almost seems like I have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures into
my
mail merge document. I would like to be able to merge pictures into
the
document that are in the same folder as the main document. Here is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path to the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
locations::documents) as the path for the merged files. I know this
because
I have moved some of the pictures into the DOCUMENTS path folder and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a
simple
task (merge the pictures in the current folder into my document) that I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR






  #8   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

OK, I have checked again on Word 2000 and it seems to work much the same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make sure
that the path it constructs from the various fields and text is identical to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems like it
should work. I have changed my INCLUDEPICTURE to your syntax below, and
while the syntax works the pictures still load from the DOCUMENTS path in
toolsptions:files locations:documents. ???? It almost seems like I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures into
my
mail merge document. I would like to be able to merge pictures into
the
document that are in the same folder as the main document. Here is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path to
the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
locations::documents) as the path for the merged files. I know this
because
I have moved some of the pictures into the DOCUMENTS path folder and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a
simple
task (merge the pictures in the current folder into my document) that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR







  #9   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

Hi macropod,

I've constucted paths using { filename \p } before, e.g. where you have

folderx
docy.doc
docy.doc.folder
docz.doc

and use

"{ filename \p }.folder\\docz.doc" to reference the .doc

but I don't think I've ever actually tried the \\..\\ thing before and am
quite surprised that it creates a legit. pathname.

Because there's mixture of single backslashes and doubled backslashes in the
constructed path name so it's a bit surprising that it works at all,
anywhere, but then that's often the way with fields :-)

Peter Jamieson

"macropod" wrote in message
...
Hi Peter,

That works too. Neat trick!

Cheers

--
macropod
[MVP - Microsoft Word]


"Peter Jamieson" wrote in message
...
| Worth trying the following, just in case...
|
| { INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }
|
| But
| a. although it appears to work here these sorts of construct make me
| nervous
| b. you may have to uncheck Word Tools|Options|General|"Web
| options"|Files|"Update links on save"
|
| Peter Jamieson
| "LAR" wrote in message
| ...
| I am now trying to use the INCLUDEPICTURE field to insert pictures into
my
| mail merge document. I would like to be able to merge pictures into
the
| document that are in the same folder as the main document. Here is
what I
| have tried and seen.
|
| I have successfully merged the pictures by using the entire path to
the
| picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
| "current folder" to merge the pictures from.
|
| I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
| only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
| locations::documents) as the path for the merged files. I know this
| because
| I have moved some of the pictures into the DOCUMENTS path folder and
only
| the
| pictures that I move there appear in the merged document.
|
| I tried to use a relative path with things like {INCLUDE PICTURE
| "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
|
| I've looked at all the VBA examples for AutoOpen but could find
nothing
| the
| TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
| document.
|
| So now, here I am again, asking how to accomplish what seems like a
simple
| task (merge the pictures in the current folder into my document) that
I
| can't
| seem to figure out for myself.
|
| Thanks in advance for any thoughts for ideas.
|
| LAR
|
|




  #10   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

Peter,

Thanks again for all your help. Here is what I have:

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }

.... and here is what it resolves to for the first pictu

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }

The only difference I see between what I have and what you proposed is that
I added the closing double quote after the .jpg.

As I said, I am trying to merge several pictures (4 in this test) into this
document. I have all 4 in the folder with the main document but only 3 in
the DOCUMENTS path folder. When I merge, only the 3 pictures in the
DOCUMENTS path folder appear in the document.

Hopefully, someone with better eyes than I can see the error in my ways.
Thanks again for spending all the time on this.

LAR

"Peter Jamieson" wrote:

OK, I have checked again on Word 2000 and it seems to work much the same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make sure
that the path it constructs from the various fields and text is identical to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems like it
should work. I have changed my INCLUDEPICTURE to your syntax below, and
while the syntax works the pictures still load from the DOCUMENTS path in
toolsptions:files locations:documents. ???? It almost seems like I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures into
my
mail merge document. I would like to be able to merge pictures into
the
document that are in the same folder as the main document. Here is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path to
the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
locations::documents) as the path for the merged files. I know this
because
I have moved some of the pictures into the DOCUMENTS path folder and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a
simple
task (merge the pictures in the current folder into my document) that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR










  #11   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

Larry,

You have a space befroe the { MERGEFIELD ) field in

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }


Is it actually in there, or is that a typo?

The other one

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }


seems OK.

Peter Jamieson


"LAR" wrote in message
...
Peter,

Thanks again for all your help. Here is what I have:

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }

... and here is what it resolves to for the first pictu

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }

The only difference I see between what I have and what you proposed is
that
I added the closing double quote after the .jpg.

As I said, I am trying to merge several pictures (4 in this test) into
this
document. I have all 4 in the folder with the main document but only 3 in
the DOCUMENTS path folder. When I merge, only the 3 pictures in the
DOCUMENTS path folder appear in the document.

Hopefully, someone with better eyes than I can see the error in my ways.
Thanks again for spending all the time on this.

LAR

"Peter Jamieson" wrote:

OK, I have checked again on Word 2000 and it seems to work much the same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make sure
that the path it constructs from the various fields and text is identical
to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems like
it
should work. I have changed my INCLUDEPICTURE to your syntax below,
and
while the syntax works the pictures still load from the DOCUMENTS path
in
toolsptions:files locations:documents. ???? It almost seems like I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures
into
my
mail merge document. I would like to be able to merge pictures
into
the
document that are in the same folder as the main document. Here is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path to
the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use
the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path
(Tools:ptions::file
locations::documents) as the path for the merged files. I know
this
because
I have moved some of the pictures into the DOCUMENTS path folder
and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a
simple
task (merge the pictures in the current folder into my document)
that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR










  #12   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

I suspect with all this focus on the path name we've forgotten the other
thing you have to do, which is:
a. If you're outputting to a new document, select the content (ctrl-A) and
press F9 to update all the fields
b. If you're outputting to a printer, you have to check Word
Tools|Options|Print|"Update links".


Peter Jamieson
"Peter Jamieson" wrote in message
...
Larry,

You have a space befroe the { MERGEFIELD ) field in

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }


Is it actually in there, or is that a typo?

The other one

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }


seems OK.

Peter Jamieson


"LAR" wrote in message
...
Peter,

Thanks again for all your help. Here is what I have:

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }

... and here is what it resolves to for the first pictu

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }

The only difference I see between what I have and what you proposed is
that
I added the closing double quote after the .jpg.

As I said, I am trying to merge several pictures (4 in this test) into
this
document. I have all 4 in the folder with the main document but only 3
in
the DOCUMENTS path folder. When I merge, only the 3 pictures in the
DOCUMENTS path folder appear in the document.

Hopefully, someone with better eyes than I can see the error in my ways.
Thanks again for spending all the time on this.

LAR

"Peter Jamieson" wrote:

OK, I have checked again on Word 2000 and it seems to work much the same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make sure
that the path it constructs from the various fields and text is
identical to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems
like it
should work. I have changed my INCLUDEPICTURE to your syntax below,
and
while the syntax works the pictures still load from the DOCUMENTS
path in
toolsptions:files locations:documents. ???? It almost seems like I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make
me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures
into
my
mail merge document. I would like to be able to merge pictures
into
the
document that are in the same folder as the main document. Here
is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path
to
the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use
the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path
(Tools:ptions::file
locations::documents) as the path for the merged files. I know
this
because
I have moved some of the pictures into the DOCUMENTS path folder
and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source
(main)
document.

So now, here I am again, asking how to accomplish what seems like
a
simple
task (merge the pictures in the current folder into my document)
that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR












  #13   Report Post  
Posted to microsoft.public.word.mailmerge.fields
macropod macropod is offline
external usenet poster
 
Posts: 1,002
Default More stupid INCLUDEPICTURE questions

Hi Peter,

Surprising indeed! And the code works equally well with '/../' instead of '\\..\\'.

I've done a bit of experimenting with the technique you described and find that it works with INCLUDETEXT, RD & HYPERLINK fields,
but not with LINK fields..

The same approach can be extended to implement true relative addressing. For example:
{INCLUDEPICTURE "{FILENAME \p}\\..\\My Pictures\\AdobeRGB.png"}
looks in the current file's child folder named 'My Pictures' and:
{INCLUDEPICTURE "{FILENAME \p}\\..\\AdobeRGB.png"}
looks in the current file's parent folder, while:
{INCLUDEPICTURE "{FILENAME \p}\\..\\..\\My Pictures\\AdobeRGB.png"}
looks in the current file's parent folder, then the parent's child folder named 'My Pictures' (I guess you could call that a sibling
folder).

Cheers


--
macropod
[MVP - Microsoft Word]


"Peter Jamieson" wrote in message ...
| Hi macropod,
|
| I've constucted paths using { filename \p } before, e.g. where you have
|
| folderx
| docy.doc
| docy.doc.folder
| docz.doc
|
| and use
|
| "{ filename \p }.folder\\docz.doc" to reference the .doc
|
| but I don't think I've ever actually tried the \\..\\ thing before and am
| quite surprised that it creates a legit. pathname.
|
| Because there's mixture of single backslashes and doubled backslashes in the
| constructed path name so it's a bit surprising that it works at all,
| anywhere, but then that's often the way with fields :-)
|
| Peter Jamieson
|
| "macropod" wrote in message
| ...
| Hi Peter,
|
| That works too. Neat trick!
|
| Cheers
|
| --
| macropod
| [MVP - Microsoft Word]
|
|
| "Peter Jamieson" wrote in message
| ...
| | Worth trying the following, just in case...
| |
| | { INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }
| |
| | But
| | a. although it appears to work here these sorts of construct make me
| | nervous
| | b. you may have to uncheck Word Tools|Options|General|"Web
| | options"|Files|"Update links on save"
| |
| | Peter Jamieson
| | "LAR" wrote in message
| | ...
| | I am now trying to use the INCLUDEPICTURE field to insert pictures into
| my
| | mail merge document. I would like to be able to merge pictures into
| the
| | document that are in the same folder as the main document. Here is
| what I
| | have tried and seen.
| |
| | I have successfully merged the pictures by using the entire path to
| the
| | picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| | picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
| | "current folder" to merge the pictures from.
| |
| | I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
| MERGEFORMAT}
| | only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
| | locations::documents) as the path for the merged files. I know this
| | because
| | I have moved some of the pictures into the DOCUMENTS path folder and
| only
| | the
| | pictures that I move there appear in the merged document.
| |
| | I tried to use a relative path with things like {INCLUDE PICTURE
| | "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
| |
| | I've looked at all the VBA examples for AutoOpen but could find
| nothing
| | the
| | TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
| | document.
| |
| | So now, here I am again, asking how to accomplish what seems like a
| simple
| | task (merge the pictures in the current folder into my document) that
| I
| | can't
| | seem to figure out for myself.
| |
| | Thanks in advance for any thoughts for ideas.
| |
| | LAR
| |
| |
|
|
|
|


  #14   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

Peter & Pod :-),

I haven't been able to get the syntax you are describing to work for me but
here is what I have been able to get working. I created an AutoOpen Macro
with the following code:

For Each aVar In ActiveDocument.Variables
If aVar.Name = "MyPath" Then num = aVar.Index
Next aVar
If num = 0 Then
ActiveDocument.Variables.Add Name:="MyPath", Value:=ActiveDocument.Path
& "\"
Else
ActiveDocument.Variables(num).Value = ActiveDocument.Path & "\"
End If
ActiveDocument.Variables(num).Value =
Replace(ActiveDocument.Variables(num).Value, "\", "\\")

My INCLUDEPICTURE looks list this:
{INCLUDEPICTURE "{DOCVARIABLE "MyPath"}{MERGEFIELD picname}.jpg"

.... and all is well. I can now move the main document to any folder and the
merge works. Phew, that wasn't all that easy.

Thanks for all the help from all.

LAR

"macropod" wrote:

Hi Peter,

Surprising indeed! And the code works equally well with '/../' instead of '\\..\\'.

I've done a bit of experimenting with the technique you described and find that it works with INCLUDETEXT, RD & HYPERLINK fields,
but not with LINK fields..

The same approach can be extended to implement true relative addressing. For example:
{INCLUDEPICTURE "{FILENAME \p}\\..\\My Pictures\\AdobeRGB.png"}
looks in the current file's child folder named 'My Pictures' and:
{INCLUDEPICTURE "{FILENAME \p}\\..\\AdobeRGB.png"}
looks in the current file's parent folder, while:
{INCLUDEPICTURE "{FILENAME \p}\\..\\..\\My Pictures\\AdobeRGB.png"}
looks in the current file's parent folder, then the parent's child folder named 'My Pictures' (I guess you could call that a sibling
folder).

Cheers


--
macropod
[MVP - Microsoft Word]


"Peter Jamieson" wrote in message ...
| Hi macropod,
|
| I've constucted paths using { filename \p } before, e.g. where you have
|
| folderx
| docy.doc
| docy.doc.folder
| docz.doc
|
| and use
|
| "{ filename \p }.folder\\docz.doc" to reference the .doc
|
| but I don't think I've ever actually tried the \\..\\ thing before and am
| quite surprised that it creates a legit. pathname.
|
| Because there's mixture of single backslashes and doubled backslashes in the
| constructed path name so it's a bit surprising that it works at all,
| anywhere, but then that's often the way with fields :-)
|
| Peter Jamieson
|
| "macropod" wrote in message
| ...
| Hi Peter,
|
| That works too. Neat trick!
|
| Cheers
|
| --
| macropod
| [MVP - Microsoft Word]
|
|
| "Peter Jamieson" wrote in message
| ...
| | Worth trying the following, just in case...
| |
| | { INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }
| |
| | But
| | a. although it appears to work here these sorts of construct make me
| | nervous
| | b. you may have to uncheck Word Tools|Options|General|"Web
| | options"|Files|"Update links on save"
| |
| | Peter Jamieson
| | "LAR" wrote in message
| | ...
| | I am now trying to use the INCLUDEPICTURE field to insert pictures into
| my
| | mail merge document. I would like to be able to merge pictures into
| the
| | document that are in the same folder as the main document. Here is
| what I
| | have tried and seen.
| |
| | I have successfully merged the pictures by using the entire path to
| the
| | picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| | picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use the
| | "current folder" to merge the pictures from.
| |
| | I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
| MERGEFORMAT}
| | only to find that WORD uses the DOCUMENTS path (Tools:ptions::file
| | locations::documents) as the path for the merged files. I know this
| | because
| | I have moved some of the pictures into the DOCUMENTS path folder and
| only
| | the
| | pictures that I move there appear in the merged document.
| |
| | I tried to use a relative path with things like {INCLUDE PICTURE
| | "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
| |
| | I've looked at all the VBA examples for AutoOpen but could find
| nothing
| | the
| | TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
| | document.
| |
| | So now, here I am again, asking how to accomplish what seems like a
| simple
| | task (merge the pictures in the current folder into my document) that
| I
| | can't
| | seem to figure out for myself.
| |
| | Thanks in advance for any thoughts for ideas.
| |
| | LAR
| |
| |
|
|
|
|



  #15   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

Typo. Sorry.

"Peter Jamieson" wrote:

Larry,

You have a space befroe the { MERGEFIELD ) field in

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }


Is it actually in there, or is that a typo?

The other one

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }


seems OK.

Peter Jamieson


"LAR" wrote in message
...
Peter,

Thanks again for all your help. Here is what I have:

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }

... and here is what it resolves to for the first pictu

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }

The only difference I see between what I have and what you proposed is
that
I added the closing double quote after the .jpg.

As I said, I am trying to merge several pictures (4 in this test) into
this
document. I have all 4 in the folder with the main document but only 3 in
the DOCUMENTS path folder. When I merge, only the 3 pictures in the
DOCUMENTS path folder appear in the document.

Hopefully, someone with better eyes than I can see the error in my ways.
Thanks again for spending all the time on this.

LAR

"Peter Jamieson" wrote:

OK, I have checked again on Word 2000 and it seems to work much the same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make sure
that the path it constructs from the various fields and text is identical
to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems like
it
should work. I have changed my INCLUDEPICTURE to your syntax below,
and
while the syntax works the pictures still load from the DOCUMENTS path
in
toolsptions:files locations:documents. ???? It almost seems like I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures
into
my
mail merge document. I would like to be able to merge pictures
into
the
document that are in the same folder as the main document. Here is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path to
the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use
the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path
(Tools:ptions::file
locations::documents) as the path for the merged files. I know
this
because
I have moved some of the pictures into the DOCUMENTS path folder
and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source (main)
document.

So now, here I am again, asking how to accomplish what seems like a
simple
task (merge the pictures in the current folder into my document)
that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR













  #16   Report Post  
Posted to microsoft.public.word.mailmerge.fields
LAR LAR is offline
external usenet poster
 
Posts: 18
Default More stupid INCLUDEPICTURE questions

Peter,

Thanks for the reminder, but yes I have been Ctrl-Aing and F9ing 'till the
cows come home.

"Peter Jamieson" wrote:

I suspect with all this focus on the path name we've forgotten the other
thing you have to do, which is:
a. If you're outputting to a new document, select the content (ctrl-A) and
press F9 to update all the fields
b. If you're outputting to a printer, you have to check Word
Tools|Options|Print|"Update links".


Peter Jamieson
"Peter Jamieson" wrote in message
...
Larry,

You have a space befroe the { MERGEFIELD ) field in

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }


Is it actually in there, or is that a typo?

The other one

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }


seems OK.

Peter Jamieson


"LAR" wrote in message
...
Peter,

Thanks again for all your help. Here is what I have:

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }

... and here is what it resolves to for the first pictu

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }

The only difference I see between what I have and what you proposed is
that
I added the closing double quote after the .jpg.

As I said, I am trying to merge several pictures (4 in this test) into
this
document. I have all 4 in the folder with the main document but only 3
in
the DOCUMENTS path folder. When I merge, only the 3 pictures in the
DOCUMENTS path folder appear in the document.

Hopefully, someone with better eyes than I can see the error in my ways.
Thanks again for spending all the time on this.

LAR

"Peter Jamieson" wrote:

OK, I have checked again on Word 2000 and it seems to work much the same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make sure
that the path it constructs from the various fields and text is
identical to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems
like it
should work. I have changed my INCLUDEPICTURE to your syntax below,
and
while the syntax works the pictures still load from the DOCUMENTS
path in
toolsptions:files locations:documents. ???? It almost seems like I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }

But
a. although it appears to work here these sorts of construct make
me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert pictures
into
my
mail merge document. I would like to be able to merge pictures
into
the
document that are in the same folder as the main document. Here
is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path
to
the
picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use
the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path
(Tools:ptions::file
locations::documents) as the path for the merged files. I know
this
because
I have moved some of the pictures into the DOCUMENTS path folder
and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source
(main)
document.

So now, here I am again, asking how to accomplish what seems like
a
simple
task (merge the pictures in the current folder into my document)
that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR













  #17   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

it sounds as if you've managed to work around the problems now, but exactly
which version of Word 2000 are you using? My copy is Word 2000 SP3 on Win
2000. There have always been odd little problems with doubling/not doubling
backslashes but they seemed mostly to disappear over time.

A couple of articles about settings that might affect this behaviour -
although logically speaking, they shouldn't, a

http://support.microsoft.com/kb/330079/en-us

http://support.microsoft.com/kb/171406/en-us

There are probably others...

Peter Jamieson

"LAR" wrote in message
...
Typo. Sorry.

"Peter Jamieson" wrote:

Larry,

You have a space befroe the { MERGEFIELD ) field in

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }


Is it actually in there, or is that a typo?

The other one

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }


seems OK.

Peter Jamieson


"LAR" wrote in message
...
Peter,

Thanks again for all your help. Here is what I have:

{ INCLUDEPICTURE "{FILENAME \p}\\..\\ {MERGEFIELD ML_Number}.jpg" }

... and here is what it resolves to for the first pictu

{ INCLUDEPICTURE "C:\Documents and
Settings\Larry\Desktop\BuyerTourTest\BuyerTour.doc \\..\\60116398.jpg" }

The only difference I see between what I have and what you proposed is
that
I added the closing double quote after the .jpg.

As I said, I am trying to merge several pictures (4 in this test) into
this
document. I have all 4 in the folder with the main document but only 3
in
the DOCUMENTS path folder. When I merge, only the 3 pictures in the
DOCUMENTS path folder appear in the document.

Hopefully, someone with better eyes than I can see the error in my
ways.
Thanks again for spending all the time on this.

LAR

"Peter Jamieson" wrote:

OK, I have checked again on Word 2000 and it seems to work much the
same
way.

Can you check your INCLUDEPICTURE field /really/ carefully and make
sure
that the path it constructs from the various fields and text is
identical
to
the path of the image you want to insert, other than having doubled-up
backslashes. No extra spaces (easy to insert by accident when
cutting/pasting)!

Peter Jamieson
"Peter Jamieson" wrote in message
...
Sorry LAR,

I had forgotten you were using Word 2000. I'll have a look at that
version.

Peter Jamieson
"LAR" wrote in message
...
Peter,

Thanks for the help. This is more what I was looking for. Seems
like
it
should work. I have changed my INCLUDEPICTURE to your syntax
below,
and
while the syntax works the pictures still load from the DOCUMENTS
path
in
toolsptions:files locations:documents. ???? It almost seems like
I
have
some basic setting wrong that is making the INCLUDEPICTURE use that
DOCUMENTS
path.

Thanks again for taking a look.

"Peter Jamieson" wrote:

Worth trying the following, just in case...

{ INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD
picname }.jpg }

But
a. although it appears to work here these sorts of construct make
me
nervous
b. you may have to uncheck Word Tools|Options|General|"Web
options"|Files|"Update links on save"

Peter Jamieson
"LAR" wrote in message
...
I am now trying to use the INCLUDEPICTURE field to insert
pictures
into
my
mail merge document. I would like to be able to merge pictures
into
the
document that are in the same folder as the main document. Here
is
what I
have tried and seen.

I have successfully merged the pictures by using the entire path
to
the
picture using something like {INCLUDE PICTURE
"C:/temp/{MERGEFIELD
picname}.jpg" \* MERGEFORMAT}. However, I want to be able to
use
the
"current folder" to merge the pictures from.

I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
MERGEFORMAT}
only to find that WORD uses the DOCUMENTS path
(Tools:ptions::file
locations::documents) as the path for the merged files. I know
this
because
I have moved some of the pictures into the DOCUMENTS path folder
and
only
the
pictures that I move there appear in the merged document.

I tried to use a relative path with things like {INCLUDE PICTURE
"../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.

I've looked at all the VBA examples for AutoOpen but could find
nothing
the
TEMPORAIRLY changed the DOCUMENTS path to that of the source
(main)
document.

So now, here I am again, asking how to accomplish what seems
like a
simple
task (merge the pictures in the current folder into my document)
that
I
can't
seem to figure out for myself.

Thanks in advance for any thoughts for ideas.

LAR













  #18   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default More stupid INCLUDEPICTURE questions

but not with LINK fields..

Yes, LINK fields have long been a bit different, probably with good reason.

Peter Jamieson

"macropod" wrote in message
...
Hi Peter,

Surprising indeed! And the code works equally well with '/../' instead of
'\\..\\'.

I've done a bit of experimenting with the technique you described and find
that it works with INCLUDETEXT, RD & HYPERLINK fields,
but not with LINK fields..

The same approach can be extended to implement true relative addressing.
For example:
{INCLUDEPICTURE "{FILENAME \p}\\..\\My Pictures\\AdobeRGB.png"}
looks in the current file's child folder named 'My Pictures' and:
{INCLUDEPICTURE "{FILENAME \p}\\..\\AdobeRGB.png"}
looks in the current file's parent folder, while:
{INCLUDEPICTURE "{FILENAME \p}\\..\\..\\My Pictures\\AdobeRGB.png"}
looks in the current file's parent folder, then the parent's child folder
named 'My Pictures' (I guess you could call that a sibling
folder).

Cheers


--
macropod
[MVP - Microsoft Word]


"Peter Jamieson" wrote in message
...
| Hi macropod,
|
| I've constucted paths using { filename \p } before, e.g. where you have
|
| folderx
| docy.doc
| docy.doc.folder
| docz.doc
|
| and use
|
| "{ filename \p }.folder\\docz.doc" to reference the .doc
|
| but I don't think I've ever actually tried the \\..\\ thing before and
am
| quite surprised that it creates a legit. pathname.
|
| Because there's mixture of single backslashes and doubled backslashes in
the
| constructed path name so it's a bit surprising that it works at all,
| anywhere, but then that's often the way with fields :-)
|
| Peter Jamieson
|
| "macropod" wrote in message
| ...
| Hi Peter,
|
| That works too. Neat trick!
|
| Cheers
|
| --
| macropod
| [MVP - Microsoft Word]
|
|
| "Peter Jamieson" wrote in message
| ...
| | Worth trying the following, just in case...
| |
| | { INCLUDEPICTURE "{ filename \p }\\..\\{ MERGEFIELD picname }.jpg }
| |
| | But
| | a. although it appears to work here these sorts of construct make
me
| | nervous
| | b. you may have to uncheck Word Tools|Options|General|"Web
| | options"|Files|"Update links on save"
| |
| | Peter Jamieson
| | "LAR" wrote in message
| | ...
| | I am now trying to use the INCLUDEPICTURE field to insert pictures
into
| my
| | mail merge document. I would like to be able to merge pictures
into
| the
| | document that are in the same folder as the main document. Here
is
| what I
| | have tried and seen.
| |
| | I have successfully merged the pictures by using the entire path
to
| the
| | picture using something like {INCLUDE PICTURE "C:/temp/{MERGEFIELD
| | picname}.jpg" \* MERGEFORMAT}. However, I want to be able to use
the
| | "current folder" to merge the pictures from.
| |
| | I have tried {INCLUDE PICTURE "{MERGEFIELD picname}.jpg" \*
| MERGEFORMAT}
| | only to find that WORD uses the DOCUMENTS path
(Tools:ptions::file
| | locations::documents) as the path for the merged files. I know
this
| | because
| | I have moved some of the pictures into the DOCUMENTS path folder
and
| only
| | the
| | pictures that I move there appear in the merged document.
| |
| | I tried to use a relative path with things like {INCLUDE PICTURE
| | "../{MERGEFIELD picname}.jpg" \* MERGEFORMAT} with no luck.
| |
| | I've looked at all the VBA examples for AutoOpen but could find
| nothing
| | the
| | TEMPORAIRLY changed the DOCUMENTS path to that of the source
(main)
| | document.
| |
| | So now, here I am again, asking how to accomplish what seems like
a
| simple
| | task (merge the pictures in the current folder into my document)
that
| I
| | can't
| | seem to figure out for myself.
| |
| | Thanks in advance for any thoughts for ideas.
| |
| | LAR
| |
| |
|
|
|
|




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ - Frequently Asked Questions - please read before posting - unofficial August Posting Charles Kenyon New Users 0 August 7th 06 05:41 PM
FAQ - Frequently Asked Questions - please read before posting - unofficial August Posting Charles Kenyon Tables 0 August 7th 06 05:41 PM
FAQ - Frequently Asked Questions - please read before posting - unofficial August Posting Charles Kenyon Microsoft Word Help 0 August 7th 06 05:40 PM
FAQ - Frequently Aske Questions - please read before posting - unofficial July posting Charles Kenyon Tables 2 July 26th 06 04:15 PM
FAQ - Frequently Aske Questions - please read before posting - unofficial July posting Charles Kenyon Microsoft Word Help 2 July 26th 06 04:14 PM


All times are GMT +1. The time now is 11:41 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"