+ Reply to Thread
Results 1 to 11 of 11

Not delivering all mails and losing formatting using mail merge

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Not delivering all mails and losing formatting using mail merge

    Hi friends,

    Greetings from me!

    I want to send wishing mails using mail merge.
    The mails are not delivering from top to bottom that is from first entry to last entry.
    Iím not getting a name of person having a birthday after a word ĎDear ,í
    Iím losing the formatting of mails as formatted in a main word document.
    The picture of cake is aligning left in mails which should be centered as in main word document.
    I want a current date (today) under the picture cake leaving one blank line above and under a current date in green color.

    Any help will be highly appreciated.

    Thanking you in anticipation.
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,859

    Re: Not delivering all mails and losing formatting using mail merge

    Hi mso3,

    See the attached .zip file that contains the following files:
    a. LJMOpenWordMailMerge6ForMso3.xls - Excel file that runs Mail Merge
    b. Birthday.docx - modified copy of your Word file.
    c. SendMails.xls - modified copy of your Excel file.

    To run Mail Merge the first time:
    a. Extract the 3 files from the .zip file into the same folder.
    b. Open file LJMOpenWordMailMerge6ForMso3.xls
    c. Left Click the Brown Shape at the Top Right to put the proper files and folders on lines 25 and 27.
    d. Left Click the Yellow Shape at the Top Left to run the Mail Merge.


    Notes and changes required in your documents:

    In word document:
    Iím not getting a name of person having a birthday after a word ĎDear ,í
    a. Type in the name of the field (e.g. NAME_OF_PERSON). BLANKS are NOT allowed in field name.
    b. Highlight the field name and then press CTRL F9 to create a Merge Field.
    When opening a document, Merge Fields may not be visible. To make Merge Fields visible, highlight the entire document and press SHIFT F9.
    Merge Fields are displayed in curly brackets preceeded by ref (e.g. {ref NAME_OF_PERSON} ).

    I want a current date (today) under the picture cake leaving one blank line above and under a current date in green color.
    a. Put in blank lines as required.
    b. Put the cursor where you want the date.
    c. Insert > Date and Time > Select Format. Check 'Update Automatically' > OK

    In Excel File:
    a. It is suggested that the first sheet in the file be used for Mail Merge purposes.
    b. Header row is line 1. This row contains field names with NO SPACES in a field name.
    c. Rows 2 thru n contain data.

    Lewis
    Attached Files Attached Files

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Not delivering all mails and losing formatting using mail merge

    Hi Lewis Sir,

    Good morning!

    Thank you for your kind response to solve my problem.
    Now it’s very close to my requirement.
    I have to send the birthday wishing to friends on their birthday.
    So I want to create letters for only those friends whose birthday is on that day that is today each day.
    I want to separate each letter to attach it to the mail.
    The word file name should be the name of friend.
    At present it’s creating the letters for all friends whose birthday is not on that particular day which I don’t want. Everything else is perfect.

    Please do the above amendments to complete the program positively.

    Extremely sorry for trouble.

    Thank you and have a nice day.

  4. #4
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Not delivering all mails and losing formatting using mail merge

    Hi Lewis Sir,

    Greetings from me!

    I found a code to achieve my target on net but didn’t understand it. Will you please look it and suggest me a solution with attachment?

    Please Login or Register  to view this content.
    Thanking you,

  5. #5
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,859

    Re: Not delivering all mails and losing formatting using mail merge

    Hi mso3,

    Thank you for posting the sample code. I was able to come up with a simpler solution, that will probably be easier for you to understand.

    See the attached .zip file that contains the following files (all files have been modified since the previous update):
    a. LJMOpenWordMailMerge7.xls - Excel file that runs Mail Merge
    b. Birthday.docx - modified copy of your Word file.
    c. SendMails.xls - modified copy of your Excel file.

    To run Mail Merge the first time:
    a. Extract the 3 files from the .zip file into the same folder.
    b. Open file LJMOpenWordMailMerge7.xls
    c. Left Click the Brown Shape at the Top Right to put the proper files and folders on lines 25 and 27.
    d. Left Click the Yellow Shape at the Top Left to run the Mail Merge.

    Please note that I added a few things to the Excel file that runs the Mail Merge:
    a. User entry of a folder name where the Output Files will go.
    b. User entry of a Mail Merge 'Field Name'. This is the Column in the Excel Data File that is used to create the 'Output File Name'.
    c. User entry of 'First' and 'Last' Birthday to include. If 'Today' is wanted, the 'Birthday' cells can be left blank.
    d. A command button that will display the 'Output File Folder' in using 'Windows Explorer'.

    The following code excerpt is taken (out of context) from the attached file, and demonstrates how the Mail Merge Code works. Several statements not related directly to function have been removed for ease of readability.
    Please Login or Register  to view this content.
    Lewis
    Attached Files Attached Files

  6. #6
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Not delivering all mails and losing formatting using mail merge

    Hi Lewis Sir,

    Good morning!

    Wav! Excellent! Really you are a master of mail merge.

    The program is working properly with correct output but now I have inserted columns to make it more perfect to achieve my target and itís not working.

    I have added a unique id for each person to insert his/her photograph as a water mark inn word file.
    If the photograph is not available then a default water mark of flowers should be inserted in the word file.
    I want the current date (today) in dd mmmm yyyy format.
    I have to send the wishing letters in two languages English and devanagari font. So I added name1, name 2 and name3 columns to meet the requirement.
    Itís not a problem for me.

    The problem now is the program is not working. I tried my level best to find out the problem but in vain.

    Therefore, I came here again to take your guidance to solve the problem.

    Iím extremely sorry for giving trouble you more. Please apologize me for the same.

    Sorry once again and have a nice day.
    Attached Files Attached Files

  7. #7
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,859

    Re: Not delivering all mails and losing formatting using mail merge

    Your problems seems to be in the Word file. You are looking for a Date Merge Field {MERGEFIELD DATE}. This is probably incorrect, and causes an error because the Excel data file DOES NOT have a field Named 'DATE'. You say you want the current date in a specific format which should probably be: {DATE \@ "d MMMM yyyy"}. Notice that the current date DOES NOT contain the KEYWORD MERGEFIELD.

    See the attached file, which implements the changes.

    Lewis
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Not delivering all mails and losing formatting using mail merge

    Hi Lewis Sir,

    Greetings from me!

    Thank you. Now the date problem is solved.

    Please guide me about the watermark problem.

    If it’s not possible then we will close this thread today marking it solved.

    Have a nice time.

  9. #9
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Not delivering all mails and losing formatting using mail merge

    Hi Lewis Sir,

    Good morning!

    I want to send wishing mails to all of my contacts. So I want to create data output letters for all the contacts.

    Please suggest me an amendment in the code to achieve the target.

    Thank you.
    Last edited by mso3; 11-02-2015 at 09:36 AM.

  10. #10
    Forum Guru
    Join Date
    01-23-2013
    Location
    USA
    MS-Off Ver
    Microsoft 365 aka Office 365
    Posts
    3,859

    Re: Not delivering all mails and losing formatting using mail merge

    Happy to inform you that I have solved the file name problem successfully.
    I'm glad it worked out. I've been busy, but when I have time, I will look into the problem.

    If I want to create the output data letters for all of my contacts then which amendment is require. I have to send greeting cards on the festival to all of my friends on festival. So in this case the ‘Today’ sheet is not require. I have to send the greeting cards to all contacts on the ‘Access’ sheet.
    On the Excel File that runs the MailMerge on 'Sheet1', change the value on line 32 (First Birthday to Include:) to January 1, 2015 and change the value on line 33 B](Last Birthday to Include:[/B]) to December 31, 2015. That will put all entries on the 'Access' Sheet on the 'Today' sheet and do what you want.

  11. #11
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: Not delivering all mails and losing formatting using mail merge

    Hi Lewis Sir,

    Good morning!

    Wav! What a simple solution. You have created a excellent program to achieve all things in a single program. I didn't think of it and wasted a lot of time to achieve the target. No matter, now the problem is solved.

    I appreciate you for the same.

    Have a nice time.

    Thank you.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Running Word Mail Merge from Excel 2010 - Mail Merge workbook fails
    By pl05.lau@gmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-05-2015, 07:35 AM
  2. Problem in delivering the mails
    By mukeshbaviskar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-24-2014, 01:42 AM
  3. Replies: 1
    Last Post: 12-28-2012, 03:46 AM
  4. Replies: 2
    Last Post: 07-12-2012, 08:11 PM
  5. Mail Merge formatting
    By ice in forum Excel General
    Replies: 1
    Last Post: 02-28-2011, 04:31 PM
  6. Losing commas in mail merge
    By dcorreia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-15-2009, 01:28 AM
  7. Replies: 5
    Last Post: 07-01-2005, 02:05 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1