Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-23-2014, 03:51 PM
CathClaud CathClaud is offline Description of Uses/Differences in Placeholders Mac OS X Description of Uses/Differences in Placeholders Office 2008 for Mac
Novice
Description of Uses/Differences in Placeholders
 
Join Date: Jun 2014
Posts: 9
CathClaud is on a distinguished road
Default

have a mail merge doc for a DIRECTORY of 303 distinct residences (408 people total). What I want is if a filed is blank it is skipped as well as the Field Name. i.e., if there is no LName2 (aka spouse/roommate) the I want LName2, FName2 Cell2, Bday2 and Anniv all skipped. BUT altho I am a whiz at envelopes and letters, the use of skip, if…then…else, next, next record - are completely eluding me and I can't find for the life of me, a description of when each gets used. All I know is that my merge is returning an unable to merge error message.



AND THEN in addition I have pictures for about 1/3 of the residents, how do I add those to the merge doc. they are all stored in one folder as home# "LName". Is there a way to automate or just add at end of the process manually once the merge is successfully completed.
Reply With Quote
  #2  
Old 06-23-2014, 04:35 PM
macropod's Avatar
macropod macropod is offline Description of Uses/Differences in Placeholders Windows 7 32bit Description of Uses/Differences in Placeholders Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

For the first part of the problem, all you need is an IF field, coded along the lines of:
{IF«LName2»<> "" "«LName2» «FName2» «Cell2» «Bday2» «Anniv»"}
plus whatever other formatting & conditional text might be associated with those mergefields.

As for the images, you need to embed the relevant mailmerge field in an INCLUDEPICTURE field. However, there are some issues with this that make the process less straightforward than one might expect. For example, when embedding a mailmerge field in an INCLUDEPICTURE field for the purpose of merging graphics:
1. the file paths to the fields need to have the separators expressed as '\\' or '/' instead of the usual '\';
2. the pictures usually won't show until you refresh the fields (eg Ctrl-A, then F9) in the output document after completing the merge; and
3. even after updating the images, they remain linked to the image files, which can be an issue if you later delete the image or you need to send the merged output to someone else.

The following field construction addresses all three issues (i.e. you don't need to do anything special to the paths, or refresh the fields, and they'll no longer be linked to the source files):
{IF{INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\«Image»"} \d}}
or:
{IF{INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "C:\Users\My Document Path\Pictures\{MERGEFIELD Image}"} \d}}
After running a mailmerge coded this way, you'll have the correct, unlinked image for each record.

This form of field construction can be very useful where the filepath for the images is held in the mailmerge data source, in which case you could use:
{IF{INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "«FilePath»\«Image»"} \d}}
or:
{IF{INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "{MERGEFIELD FilePath}\{MERGEFIELD Image}"} \d}}

Note1: You need a path separator between the filepath mergefield and the image mergefield. If that separator is included in the source data, it can be omitted from the field above construction but leaving it there has no adverse effects
either.

If you can be sure the pictures will always be in the same folder as the mailmerge main document, you can incorporate a FILENAME field thus:
{IF{INCLUDEPICTURE {IF TRUE "{FILENAME \p}\..\{MERGEFIELD Image}"} \d} {INCLUDEPICTURE {IF TRUE "{FILENAME \p}\..\{MERGEFIELD Image}"} \d}}
or:
{IF{INCLUDEPICTURE {IF TRUE "{FILENAME \p}\..\«Image»"} \d} {INCLUDEPICTURE {IF TRUE "{FILENAME \p}\..\«Image»"} \d}}

If the path data are included with in the image field, you can use:
{IF{INCLUDEPICTURE {IF TRUE «Image»} \d} {INCLUDEPICTURE {IF TRUE «Image»} \d}}
or:
{IF{INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d} {INCLUDEPICTURE {IF TRUE {MERGEFIELD Image}} \d}}

For what it's worth, *provided* the path has the separators expressed as '\\' or '/', you can retain the links by omitting the all-encompassing IF test and the images will display correctly without the need to refresh the fields after completing the merge. For example:
{INCLUDEPICTURE {IF TRUE "C:\\Users\\My Document Path\\Pictures\\«Image»"} \d}

Note2: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac); you can't simply type them or copy & paste them from this message. Nor is it practicable to add them via any of the standard Word dialogues. Likewise, you can't type or copy & paste the chevrons (i.e. '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar. The spaces represented in the field construction are all required.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-23-2014, 05:10 PM
CathClaud CathClaud is offline Description of Uses/Differences in Placeholders Mac OS X Description of Uses/Differences in Placeholders Office 2008 for Mac
Novice
Description of Uses/Differences in Placeholders
 
Join Date: Jun 2014
Posts: 9
CathClaud is on a distinguished road
Default

OK Pictures are going to be dealt with on case by case basis. Thanks for the IF statement.

this is my code:
«LName2», «FName2» • «Bday2»
«Email2» • Cell: «CPhone2»

when I add your IF like this:
{IF«LName2»<> "" "«LName2», «FName2» • «Bday2»
«Email2» • Cell: «CPhone2»"}

the result I get is this:
Warren, Dolores • Bday: 12/24
• Cell:
{IF«LName2»<> "" "«LName2» «FName2» «Cell2» «Bday2»"}
1 La Lomita
HPhone: 805498-5735

So I am obviously doing something different that I am not seeing. What is it?

BTW Cmd-F9, does not update anything, I think because I am running Mavericks?
Reply With Quote
  #4  
Old 06-23-2014, 06:03 PM
macropod's Avatar
macropod macropod is offline Description of Uses/Differences in Placeholders Windows 7 32bit Description of Uses/Differences in Placeholders Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Did you read the last Note in my previous post? The fact you're getting:
{IF«LName2»<> "" "«LName2» «FName2» «Cell2» «Bday2»"}
suggests not. Cmd-F9 on a Mac isn't meant to update anything - it creates a pair of field braces at the insertion point.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 06-23-2014, 06:17 PM
CathClaud CathClaud is offline Description of Uses/Differences in Placeholders Mac OS X Description of Uses/Differences in Placeholders Office 2008 for Mac
Novice
Description of Uses/Differences in Placeholders
 
Join Date: Jun 2014
Posts: 9
CathClaud is on a distinguished road
Default

is NOT creating field braces or anything else :-(
am using .doc instead of 08 docx - would that make a difference?
Reply With Quote
  #6  
Old 06-23-2014, 06:23 PM
macropod's Avatar
macropod macropod is offline Description of Uses/Differences in Placeholders Windows 7 32bit Description of Uses/Differences in Placeholders Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

That suggests someone has messed up the keyboard shortcut. The file format is of no consequence. Even so, you could insert the IF field from the mailmerge rules dropdown, or via Insert|Field (IIRC), then switch to the document and finish the field construction there. You may need to press Alt-F9 to expose the field codes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 06-23-2014, 06:31 PM
CathClaud CathClaud is offline Description of Uses/Differences in Placeholders Mac OS X Description of Uses/Differences in Placeholders Office 2008 for Mac
Novice
Description of Uses/Differences in Placeholders
 
Join Date: Jun 2014
Posts: 9
CathClaud is on a distinguished road
Default

you do IIRC very WELL! that will do!
Reply With Quote
Reply

Tags
mailmerge field, word 2008 mac

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error in calculating differences kiwikees Excel 2 06-15-2014 06:22 PM
Auto populate invoice (including description) from data sheet agenevieve Excel 2 12-06-2012 04:48 AM
Description of Uses/Differences in Placeholders Calculate differences between text cells? poobear Excel 2 05-19-2012 06:43 AM
Description of Uses/Differences in Placeholders Formula to select description when code is entered Natasha Excel 1 09-25-2011 12:59 PM
Question regarding differences among styles bigsnowdog Word 0 08-01-2010 02:41 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft