#1
|
|||
|
|||
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 |
#2
|
||||
|
||||
{ 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) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#3
|
|||
|
|||
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 |
#4
|
||||
|
||||
Unless the path to the pics is somewhere accessible via the relative paths technique described in https://www.msofficeforums.com/word/...nal-files.html, 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 [Fmr MS MVP - Word] |
#5
|
|||
|
|||
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 |
|
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 |