0

I need to a send a bunch on emails from Outlook that reads from Word and Excel. The text content will be from Word and user_email_ID, First_Name content will be from Excel. I know how to do up to this part and have done so in the past but a new addition will be to merge some fields only based on yes/no (Y/N) from the Excel sheet. For example:

  Name Age Field1 Field2 Field3
  XXX   39   Y       N     Y
  YYY   29   N       N     N
  ZZZ   10   Y       Y     Y

In the above case, the text should look like:

for Record 1

Hello <Name>
       text text text, items 
       1) Field 1
       2) Field 3

for Record 2

Hello <Name>
       text text text, items 

       No Items, you are good to go.

for Record 3

Hello <Name>
       text text text, items 
       1) Field 1
       2) Field 2
       3) Field 3

This part should not take me much time to do in C++, or even is MySQL but I am not so quick using Microsoft products like Excel, Word, Outlook.

Can someone be kind enough to give me a heads up on which one should I start looking for in Outlook or Excel, or redirection to a relevant article please? Also, has anyone had the same problem before?

3
  • Just Office merge, How can I migrate this topic to superuser? Apr 10, 2012 at 18:21
  • 1
    I'll get a moderator to do that for you, just sit tight.
    – Alain
    Apr 10, 2012 at 18:24
  • Is Someone experiencing the same problem?? Apr 16, 2012 at 19:25

1 Answer 1

0

You have to add the braces with Ctrl-F9 but you basically want the simple IF. {IF {MERGEFIELD My_Field} = "Y" "some text" ""}.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .