Date macro

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I have a form for scheduling conference rooms and would like to have a macro that would create a unique date at the top of this form for every day of the year with the day of the week first, followed by the day (e.g, Wednesday, May 26, 2004). I would like the option to start with any date I wanted to and print for as many days as I wanted to (e.g., start with January 1 for 180 days or start with November 4 for 30 days, etc.). Of course, I am perfectly willing to change these parameters manually within the macro if necessary (to simplify the code). In addition, I would like it to skip Saturday and Sunday. Anyone have something like this?
 
An easy approach would be to set up a mail merge using an Excel spreadsheet
as the data source. It's easy to create lists of dates in any desired format
in Excel. In this case, you would enter the Monday through Friday, then the
next Monday (to show Excel you want to skip weekends), then drag to
AutoFill. If necessary, Format | Cells to apply the desired date formatting.
To create the mail merge, select the desired records (dates) and Merge to
New Document.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Lana said:
Hi,
I have a form for scheduling conference rooms and would like to have a
macro that would create a unique date at the top of this form for every day
of the year with the day of the week first, followed by the day (e.g,
Wednesday, May 26, 2004). I would like the option to start with any date I
wanted to and print for as many days as I wanted to (e.g., start with
January 1 for 180 days or start with November 4 for 30 days, etc.). Of
course, I am perfectly willing to change these parameters manually within
the macro if necessary (to simplify the code). In addition, I would like it
to skip Saturday and Sunday. Anyone have something like this?
 
Hi Suzanne
Thanks for the tip. Didn't work like I expected, but using the Day of Week in 1 column and the Date in another, then using the fill feature with the Weekdays option I was able to generate a spread sheet datasource. Then the mailmerge from Word worked just fine. Simple solution to a complex coding problem. Thank you again
Lana
 
Glad you got it figured out given the exiguous and faulty lead I gave you!

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Lana said:
Hi Suzanne,
Thanks for the tip. Didn't work like I expected, but using the Day of
Week in 1 column and the Date in another, then using the fill feature with
the Weekdays option I was able to generate a spread sheet datasource. Then
the mailmerge from Word worked just fine. Simple solution to a complex
coding problem. Thank you again.
 
Back
Top