Microsoft Office Forums

Go Back   Microsoft Office Forums > Microsoft Word > Mail Merge

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 01-04-2017, 07:32 AM
leaning leaning is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jan 2011
Posts: 14
leaning is on a distinguished road
Default Add a subdirectory for mail merge

Hello!



I have photos in the same directory as the Word document and Excel file, but as I add more photos, the directory is getting cluttered. Right now the mail merge works great.

If I want to add a subdirectory "Pics", what is the syntax to get that into the mailmerge code?

{INCLUDEPICTURE {IF TRUE "{MERGEFIELD PartPhoto}.jpg} \d}

Thanks for your help!
Regards,
leaning
Reply With Quote
  #2  
Old 01-04-2017, 07:40 AM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2016
Expert
 
Join Date: Aug 2014
Posts: 2,227
gmayor is a jewel in the roughgmayor is a jewel in the roughgmayor is a jewel in the roughgmayor is a jewel in the rough
Default

{ INCLUDEPICTURE { IF TRUE "C:\Path\{MERGEFIELD PartPhoto}.jpg" } \d } where C:\Path\ is the location of the files - see also http://www.gmayor.com/mail_merge_graphics.htm and http://www.gmayor.com/mail_merge_graphics_addin.htm
__________________
Graham Mayor - MS MVP (Word)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
  #3  
Old 01-04-2017, 07:58 AM
leaning leaning is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jan 2011
Posts: 14
leaning is on a distinguished road
Default

gmayor:

I appreciate the reply, but I should have been more specific: I'd rather not put the whole path in there. The file is on a server and it is nested down deep (\\X47D\Logistics\Logistics Flow\CX\Bob Smith Files\Part Catalog\. I want to add Part Catalog\Pics, but I don't want all that path in the code. Just the \Pics part.

Is that possible?

Regards,
leaning
Reply With Quote
  #4  
Old 01-04-2017, 02:52 PM
macropod's Avatar
macropod macropod is online now Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 16,666
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Unless the path to the pics is somewhere accessible via the relative paths technique described at http://windowssecrets.com/forums/sho...External-Files, you will have to supply the entire path - either with the mailmerge data or by embedding it in the field code (or as a combination of the two).
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #5  
Old 01-04-2017, 08:00 PM
leaning leaning is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Jan 2011
Posts: 14
leaning is on a distinguished road
Default

Hmm..

I was hoping to be able to get away with something like:

{INCLUDEPICTURE "{FILENAME \p}\\..\\..\\pics\\{MERGEFIELD Photo}.jpg” \d}

(I saw this example on one of your other posts.)

As it is now works, but there's 200 or so pictures in the parent directory, so it's tough to find the Word doc in there.

Thanks for your help and info.

Regards,
leaning
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge fields merge incorrectly and won't fix. marym Mail Merge 3 04-09-2016 05:17 AM
Mail Merge is Deleting objects in my header and footer during the merge bgranzow Mail Merge 9 06-05-2015 05:03 AM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM
Mail Merge Duplication of address on merge RICKY Mail Merge 1 09-26-2012 03:14 PM
Saving INDV mail merges During the mail merge sedain121 Mail Merge 2 10-04-2011 07:52 PM


All times are GMT -7. The time now is 04:33 PM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
MSOfficeForums.com is not affiliated with Microsoft