Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Word: Formating Merge Field - TIME! 1

Status
Not open for further replies.

Gymnast14

Technical User
Dec 21, 2006
38
US
I have an excel document with data in time format. For example, 8:44. When I click on the cell, Excel shows it as 8:44:00 AM

I'm merging into a Word document. I cannot find a good switch to format the time correctly. I just want it to show "8:44". Right now I am trying:

{ MERGEFIELD "Distance" \@ "HH:mm"}

And it is not working. It's displaying the value as "0.28194444444"

Help please! Thanks!
 
Hi,

Geez. When I MailMerge with Excel Date/Time, I get...

Dates and Times in Word.

???

Hmmmm??? Does your TIME column have Time and only Time values?

Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Yeah, the excel spreadsheet just has 8:44 as the value. Here are some screenshots of what I'm working on.

Excel Document (using the "Distance" field)
excelscreenshotvf5.jpg


Word mail merge - how the value comes across

wordmergefieldvv1.jpg
 
I cannot replecate your condition for Distance.

Curious that your original example...
[tt]
8:44 with corresponding 0.28194444444
[/tt]
0.28194444444 is not 8:44, but rather 6:46.

Tiy may have something else going on, or your example is not data-consistent.


Skip,
[sup][glasses]Don't let the Diatribe...
talk you to death![tongue][/sup][sub]
[glasses]Just traded in my old subtlety...
for a NUANCE![tongue][/sub]
 
Hi Gymnast14,

Apart from the question of what time your data holds, you should check you mailmerge data connection type, and make sure it's DDE. To do this in Word 97-2003, select Tools |Options|General and check the box against the "Confirm conversions at open" item. In Word 2007 it is Office Button|Word Options|Advanced|General > Confirm file format conversion on open. Then when you attach the data source to the mailmerge main document, you will be given the option of using the DDE method of connection which should read the data as you have it formatted in the table.

Cheers

[MS MVP - Word]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top