Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-08-2013, 11:45 AM
CrabApple CrabApple is offline Word 2013 macro to generate last day of each week (Saturday) Windows 7 64bit Word 2013 macro to generate last day of each week (Saturday) Office 2010 64bit
Novice
Word 2013 macro to generate last day of each week (Saturday)
 
Join Date: Jan 2012
Posts: 17
CrabApple is on a distinguished road
Default Word 2013 macro to generate last day of each week (Saturday)

To Whom It Concerns:



Thank you in advance for your time. Previous assistance on this forum has made my paperwork much, much easier. I'm hoping I can simplify the process even more by adding a macro in my attendance report template.

Basically, I want a date to be generated whenever the template is opened that is the Saturday of that week. My organization operates on a Sunday through Saturday schedule.

Once the Saturday date in question (reflecting the reporting period) is entered into the form field, I already have the other dates generated automatically on the template. The question is: can I create a macro that will automatically generate the Saturday for that week? It has to be the SUBSEQUENT Saturday, not the preceding Saturday.

e.g. if I opened the document anytime this week (reporting period 11/03/13-11/09/13), including Saturday 11/09/13, I would want it to generate the date 11/09/13 in a form field.

IF this is possible, I have one follow-up question:

When saving the template, it generates a .docx. I want it to keep doing this. If a macro is present in the template, will it prompt me to save a .docm? If YES, is there a way to disable it and just have it save without the macro? I don't want the macro to persist in the documents it creates. This would sound alarm bells by those receiving the attendance reports.

Thanks in advance!

Sincerely,

CrabApple
Reply With Quote
  #2  
Old 11-08-2013, 02:40 PM
macropod's Avatar
macropod macropod is online now Word 2013 macro to generate last day of each week (Saturday) Windows 7 32bit Word 2013 macro to generate last day of each week (Saturday) Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,365
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi CrabApple,

First off, .docx files cannot contain macros. You could, however, have a macro in the document's template. Be aware, though, that your use of the 'template' term doesn't appear to be the same as what Word regards as a template (i.e. a .dotx or .dotm file). Saving a template doesn't produce a .docx file - it remains a .dotx or .dotm file. A document created from a .dotx or .dotm template, however, will ordinarily be a .docx file.

As for the dates, what you've described so far can be done without macros or formfields. To see how to do this and just about everything else you might want to do with dates in Word, check out my Microsoft Word Date Calculation Tutorial, at:
http://windowssecrets.com/forums/sho...ation-Tutorial
or
http://www.gmayor.com/downloads.htm#Third_party
In particular, look at the item titled 'Calculate a Stepped Date'. Do read the document's introductory material.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2013 macro to generate last day of each week (Saturday) Excel 2013 Record Macro greyed out av8r Excel 7 02-17-2016 08:04 PM
Using Word/OL 2010 to generate personalized email messages rickr44318 Word 0 06-26-2013 06:34 AM
Which ODF/ .odt version is word 2010, 2013 preview & eventually 2013 full using? semiotically Word 8 11-08-2012 05:44 PM
Randomly generate numbers, Macro? Jamtart PowerPoint 30 08-15-2012 10:55 AM
Word 2013 macro to generate last day of each week (Saturday) 5 days/week during planning & 7 days/week during implementation sanlen Project 1 06-25-2012 04:17 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:05 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft