A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date macro



 
 
Thread Tools Display Modes
  #1  
Old May 14th, 2004, 06:11 PM
Lana
external usenet poster
 
Posts: n/a
Default Date macro

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?
  #2  
Old May 14th, 2004, 10:50 PM
Suzanne S. Barnhill
external usenet poster
 
Posts: n/a
Default Date macro

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
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Lana" wrote in message
...
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?

  #3  
Old May 15th, 2004, 01:01 AM
Lana
external usenet poster
 
Posts: n/a
Default Date macro

Thank you Suzanne, I'll try that on Monday and let you know how it works.

Lana
  #4  
Old May 17th, 2004, 04:06 PM
Lana
external usenet poster
 
Posts: n/a
Default Date macro

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
  #5  
Old May 17th, 2004, 05:13 PM
Suzanne S. Barnhill
external usenet poster
 
Posts: n/a
Default Date macro

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
Word MVP FAQ site: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

"Lana" wrote in message
news
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


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:23 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.