Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
date display from excel in word
Hello all,
I'm working on a macro wich must look for people,dates,currency.. and so on in a big table, so the selected data are placed in a smaller table, from wich a word macro (activated by a cmdbutton in excel) uses tha data to make a mail merge. The selected data is used to write 25-50 letters a time without having to type :-) All works well, and as it should, only the date (as in: 12/05/2006) is displayed as a number ( wich excel uses..) so i don't have date's in my letters but things as "38849". Not very usefull.. can anybody tell me how to display the excel date as a date in word ? I already tried with automated copy-paste, that works, but only very slowly. I also tried to automate copy and paste in a texbox in excel..that doesn't work, because i can't paste in a texbox..any ideas ? tia sven |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
date display from excel in word
In either the small or large table, select the cells with the dates in them
and run: Sub datefixer() For Each r In Selection v = Format(DateValue(r.Value), "mm/dd/yyyy") r.NumberFormat = "@" r.Value = v Next End Sub This converts the anys into strings with the specified date format. They should import into Word just fine. -- Gary's Student gsnu200705 "[sven]" wrote: Hello all, I'm working on a macro wich must look for people,dates,currency.. and so on in a big table, so the selected data are placed in a smaller table, from wich a word macro (activated by a cmdbutton in excel) uses tha data to make a mail merge. The selected data is used to write 25-50 letters a time without having to type :-) All works well, and as it should, only the date (as in: 12/05/2006) is displayed as a number ( wich excel uses..) so i don't have date's in my letters but things as "38849". Not very usefull.. can anybody tell me how to display the excel date as a date in word ? I already tried with automated copy-paste, that works, but only very slowly. I also tried to automate copy and paste in a texbox in excel..that doesn't work, because i can't paste in a texbox..any ideas ? tia sven |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
date display from excel in word
Debra Dalgleish posted this:
There's an article on the Microsoft web site that might help you: Answer Box: Numbers don't merge right in Word http://office.microsoft.com/en-ca/as...164951033.aspx And if you prefer the old Mail Merge helper, Word MVP Suzanne Barnhill has instructions he http://sbarnhill.mvps.org/WordFAQs/C...ngWord2002.htm about half way down the page. "[sven]" wrote: Hello all, I'm working on a macro wich must look for people,dates,currency.. and so on in a big table, so the selected data are placed in a smaller table, from wich a word macro (activated by a cmdbutton in excel) uses tha data to make a mail merge. The selected data is used to write 25-50 letters a time without having to type :-) All works well, and as it should, only the date (as in: 12/05/2006) is displayed as a number ( wich excel uses..) so i don't have date's in my letters but things as "38849". Not very usefull.. can anybody tell me how to display the excel date as a date in word ? I already tried with automated copy-paste, that works, but only very slowly. I also tried to automate copy and paste in a texbox in excel..that doesn't work, because i can't paste in a texbox..any ideas ? tia sven -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to set the day date in excel to display 1st, 2nd, etc...? | Excel Discussion (Misc queries) | |||
Display symbols in embedded excel sheet in word | Excel Discussion (Misc queries) | |||
Excel Date Display? | Excel Discussion (Misc queries) | |||
display extension for date in excel | Excel Discussion (Misc queries) | |||
Display Word Paragraphs in Excel??? | Excel Programming |