Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
As the result of a recent €˜upgrade to our company database software I need
to reformat a number of the merge documents that information is pulled into. When a user sets up an appointment it is done via this software, and part of this includes the duration of the appointment. Formerly, the software created a CSV file that showed this as a duration in hours and minuets e.g. €œ2h 45m€ but apparently this was causing problems for some customers and if now just creates a CSV file containing the duration in minute format, regardless of duration. Since some of our appointments last a number of hours, its really not suitable to put in 165 minutes in a letter. Im using date switches in another part of the letters, but I cant figure out how to devise a suitable switch to format this number string into a format where is displays as something like 1h 45mins instead of just the number of minuets. Im sure there should be a way round this, but I just cant find it. Any suggestions would be very helpful. |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
As long as the field in the CSV is just a number, you could use something
like { = mod({ MERGEFIELD duration },60) \#0 } to give you the minutes and { = int({ MERGEFIELD duration }/60) } to give you the hours. If the field also specifies the units, e.g. { = mod({ MERGEFIELD duration \#0 },60) \#0 } to give you the minutes and { = int({ MERGEFIELD duration \#0 }/60) } i.e. using a numeric format switch should effectively strip off the "mins" Peter Jamieson 131mins then you can probably get away with "Caroline" wrote in message ... As the result of a recent 'upgrade' to our company database software I need to reformat a number of the merge documents that information is pulled into. When a user sets up an appointment it is done via this software, and part of this includes the duration of the appointment. Formerly, the software created a CSV file that showed this as a duration in hours and minuets e.g. "2h 45m" but apparently this was causing problems for some customers and if now just creates a CSV file containing the duration in minute format, regardless of duration. Since some of our appointments last a number of hours, it's really not suitable to put in 165 minutes in a letter. I'm using date switches in another part of the letters, but I can't figure out how to devise a suitable switch to format this number string into a format where is displays as something like 1h 45mins instead of just the number of minuets. I'm sure there should be a way round this, but I just can't find it. Any suggestions would be very helpful. |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Thank you both so very much.
I think I was just about to go crazy. Thank you again... you really have saved me so much stress... and as a bonus I now understand switches a heck of a lot better. Have a great week. |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
This problem was sufficiently interesting to add the solutions to my web
site - see http://www.gmayor.com/formatting_word_fields.htm -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Caroline wrote: Thank you both so very much. I think I was just about to go crazy. Thank you again... you really have saved me so much stress... and as a bonus I now understand switches a heck of a lot better. Have a great week. |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
There may be a simpler way which doesn't easily come to mind, but if your
mergefield produces 165 then you can use some mathematics to get the information you require. The following should work: { =INT({Mergefield Fieldname}/60) \# "0'h'" }{ = 60 * (({Mergefield Fieldname}/60) - { =INT({Mergefield Fieldname}/60) }) \# "0'mins'"} -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Caroline wrote: As the result of a recent 'upgrade' to our company database software I need to reformat a number of the merge documents that information is pulled into. When a user sets up an appointment it is done via this software, and part of this includes the duration of the appointment. Formerly, the software created a CSV file that showed this as a duration in hours and minuets e.g. "2h 45m" but apparently this was causing problems for some customers and if now just creates a CSV file containing the duration in minute format, regardless of duration. Since some of our appointments last a number of hours, it's really not suitable to put in 165 minutes in a letter. I'm using date switches in another part of the letters, but I can't figure out how to devise a suitable switch to format this number string into a format where is displays as something like 1h 45mins instead of just the number of minuets. I'm sure there should be a way round this, but I just can't find it. Any suggestions would be very helpful. |
#6
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]() In a merge field, how do I convert a currency format to a text format or, in the alternative a number format to a text format -- Lee Grimm Posted from - http://www.officehelp.in |
#7
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Graham Mayor's excellent page at
http://www.gmayor.com/formatting_word_fields.htm will probably tell you most of what you need to know. If not, ask your question. Peter Jamieson "Lee Grimm" wrote in message ... In a merge field, how do I convert a currency format to a text format or, in the alternative a number format to a text format -- Lee Grimm Posted from - http://www.officehelp.in |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Mail Merge Question | Microsoft Word Help | |||
Mail merge question ? | Mailmerge | |||
mail merge with attachments | Mailmerge | |||
Can I use merge to create 3x5 question and answer flash cards? | New Users | |||
merge with excel question | Mailmerge |