RSS

format date pada mail merge

01 Jul
Mail Merge: Reformat Date, Time and Number fields imported from Excel
When date, time or number fields are imported from Excel to a Word mail merge document the formatting reverts to general format, as defined in the BIOS of your computer, eg date fields display as mm/dd/yy. You can reformat them in the Word mail merge document and the changes you make will remain in the document. Follow the steps outlined in this article to reformat them.

Date Fields imported from an Excel file to a Mail Merge document

  1. In the Word mail merge document, select the imported date field.
  2. Right click over the selected field and choose Edit Field… from the menu commands to open the Field dialogue box.
  3. Click on the Field Codes button (bottom left of Field dialogue box)
  4. At Advanced Field Properties (top right of dialogue box) you will see a box with information similar to the text below

    MERGEFIELD StartDate

  5. Type the following after the name of the field

    \@ “dd-MMM-yy” to see date in the format 25-Feb-10
    \@ “dd/MM/yyyy” to see the date in the format 25/02/2010
    \@ “dd MMMM yyyy” to see the date in the format 25 February 2010
    \@ “dddd, dd MMMM yyyy” to see the date in the format Friday, 25 February 2010

    There are others, experiment if you want other date formats.

    The box should now look similar to this: MERGEFIELD StartDate \@ “dd-MMM-yy”

  6. Click on the OK button on the Field dialogue box.

The document will remember the format you have given the date, so when you run the mail merge again you do not have to repeat the procedure.

Time Fields imported from an Excel file to a Mail Merge file

  1. In the Excel document, make sure that the time is entered correctly, eg 13:45, you may find it formats itself as a date, in which case you should highlight all of the cells that will hold time values, click on the Format menu and select Cells. On the dialogue box with the number tab selected, choose the custom category and scroll through the custom formats and select hh:mm – this will format the time correctly.
  2. In the Word document, select the imported time field.
  3. Right click over the selected field and choose Edit Field… from the menu commands to open the Field dialogue box.
  4. Click on the Field Codes button (bottom left of Field dialogue box)
  5. At Advanced Field Properties (top right of dialogue box) you will see a box with information similar to the text below

    MERGEFIELD Arrival Time

  6. Type the following after the name of the field

    \@ “HH:mm” to see time in the format 13:45
    \@ “HH:mm:ss” to see the time in the format 13:45:30
    \@ “h:mm AM\PM” to see the time in the format 1:45 PM
    \@ “h:mm:ss AM\PM” to see the time in the format 1:45:30 PM
    The box should now look similar to this: MERGEFIELD Arrival Time \@ “HH:mm”

  7. Click on the OK button on the Field dialogue box.

The document will remember the format you have given the time, so when you run the mail merge again you do not have to repeat the procedure.

Number Fields imported from an Excel file to a Mail Merge document

  1. In the Excel document, make sure that the number is a numeric value, and not a text value.
  2. In the Word mail merge document, select the imported number field.
  3. Right click over the selected field and choose Edit Field… from the menu commands to open the Field dialogue box.
  4. Click on the Field Codes button (bottom left of Field dialogue box)
  5. At Advanced Field Properties (top right of dialogue box) you will see a box with information similar to the text below

    MERGEFIELD HireFee

  6. Type the following after the name of the field

    \# “0.00” to see number in the format 1234.50

    \# “#,##0.00;- #,##0.00” to see positive number in the format 1,234.50 and negative number in the format -1,234.50

    \# “£#,##0.00;- £#,##0.00” to see positive number in the format £1,234.50 and negative number in the format -£1,234.50

  7. The box should now look similar to this: MERGEFIELD HireFee \# “#,##0.00;- #,##0.00”
  8. Click on the OK button on the Field dialogue box.

The document will remember the format you have given the number, so when you run the mail merge again you do not have to repeat the procedure.

Applies to: Word 2002, 2003 and 2007, does not apply to previous versions.

sumber : http://www.ashbee.co.uk/index.php/faq/48-word/97-mail-merge-reformat-date-time-and-number-fields-imported-from-excel

Iklan
 
Komentar Dinonaktifkan pada format date pada mail merge

Ditulis oleh pada Juli 1, 2015 in Asal Coret

 

Komentar ditutup.

 
%d blogger menyukai ini: