Computer Learning Zone CLZ Access Excel Word Windows

If you are planning for a year, sow rice; if you are planning for a decade, plant trees; if you are planning for a lifetime, educate people

-Chinese Proverb
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Microsoft Word Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Filename to include Datepicker
Richard F 

13 years ago
MS Word 2010 - Filename to include Datepicker Value

I have composed a Template/Form in Word 2010 for Team Meeting Minutes. The date of the meeting is selected from a Date Picker Content Control. I have inserted a [Save] button with the purpose of naming the file consistantly, using the value of the Date Picker.

Here is the code:

Private Sub CommandButton50_Click()
ActiveDocument.SaveAs FileName:="C:\Users\Richard\Documents\Meeting Minutes\2013\September\Team Meeting Minutes" & ActiveDocument.Bookmarks("Date").Range.Text & ".doc"
End Sub

What I would like to do, is break the date down into Month and Year components so that the file can be saved in the correct folder sorted by Year and Month.

ie. "C:\Users\rick\Documents\Meeting Minutes\"[year value]\[month value]"\Team Meeting Minutes"&[long date picker value]".doc" - (not macro enabled)

I've searched everywhere on the internet for weeks and am still stumped.
I have had limited success with Format(Value, "yyyy") using msgbox to confirm the values I'm getting but run into all sorts value mismatch problems.

I am supposing my problem is primarily the way I'm calling for the Date Picker value, at this time you'll note I'm using Bookmarks of Date Picker Tag named "Date" (yes I know the name is dangerous and probably should be called "MeetingDay" or similar)

Any suggestions, help appreciated. The full working code would be handy rather than just a part explanation, I'm still very much a Beginner level ability.

Cheers,
Rick

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Microsoft Word Forum.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/18/2026 1:07:21 AM. PLT: 0s