puppygirl3939
Technical User
I was wondering if by any chance anyone has been been able to create a mail merge in microsoft word with 2 groupings. Example Data:
Country City Name Title
USA Dallas John Manager
USA Dallas Brian Assistant
USA Florida Tom Assistant
Europe London Liz VP
Europe France Carmen Director
Europe France Bill Assistant
The result should be:
USA
Dallas
John, Manager
Brian, Assistant
Florida
Tom, Assistant
EUROPE
London
Liz, VP
France
Carmen, Director
Bill, Assistant
Here is the code I am using:
{If{MergeSeq}="1" "{Mergefield Country}
" ""}{Set Place1{Mergefield Country}}
{If{MergeSeq}="1" "{Mergefield City}
" ""}{Set Place1{Mergefield City}}
{If {Place2{Mergefield Country}}<>{Place1{Mergefield Country}}"
{Mergefield Country}
{If {Place2{Mergefield City}}<>{Place1{Mergefield City}}"
{Mergefield City}
{Mergefield Name}{Mergefield Title}" "{Mergefield Name}{Mergefield Title}"}{Set Place2{Mergefield Country}}
This is the result I am getting :
USA
Dallas
John, Manager
USA
Dallas
Brian, Assistant
USA
Florida
Tom, Assistant
EUROPE
London
Liz, VP
Europe
France
Carmen, Director
Europe
France
Bill, Assistant
Any suggestions!
Country City Name Title
USA Dallas John Manager
USA Dallas Brian Assistant
USA Florida Tom Assistant
Europe London Liz VP
Europe France Carmen Director
Europe France Bill Assistant
The result should be:
USA
Dallas
John, Manager
Brian, Assistant
Florida
Tom, Assistant
EUROPE
London
Liz, VP
France
Carmen, Director
Bill, Assistant
Here is the code I am using:
{If{MergeSeq}="1" "{Mergefield Country}
" ""}{Set Place1{Mergefield Country}}
{If{MergeSeq}="1" "{Mergefield City}
" ""}{Set Place1{Mergefield City}}
{If {Place2{Mergefield Country}}<>{Place1{Mergefield Country}}"
{Mergefield Country}
{If {Place2{Mergefield City}}<>{Place1{Mergefield City}}"
{Mergefield City}
{Mergefield Name}{Mergefield Title}" "{Mergefield Name}{Mergefield Title}"}{Set Place2{Mergefield Country}}
This is the result I am getting :
USA
Dallas
John, Manager
USA
Dallas
Brian, Assistant
USA
Florida
Tom, Assistant
EUROPE
London
Liz, VP
Europe
France
Carmen, Director
Europe
France
Bill, Assistant
Any suggestions!