Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-25-2022, 07:17 AM
JWigglesworth JWigglesworth is offline VBA to lock a Word File after a certain date Windows 10 VBA to lock a Word File after a certain date Office 2021
Novice
VBA to lock a Word File after a certain date
 
Join Date: Feb 2022
Posts: 2
JWigglesworth is on a distinguished road
Default VBA to lock a Word File after a certain date

Hi Forum



I am trying to find out if there is any way to lock a Word file with a password that only becomes active after a certain date. I produce work products in Word and sometimes customers are "late" paying invoices. This would be a way to give access only until a certain date. They pay the invoice and get the password.

Can anyone help?

Many thanks

John
Reply With Quote
  #2  
Old 02-25-2022, 09:02 PM
macropod's Avatar
macropod macropod is offline VBA to lock a Word File after a certain date Windows 10 VBA to lock a Word File after a certain date Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,369
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

Any user who becomes aware of your ruse can simply work around it by any one or more of:
1. Save the document in the docx format;
2. Copy/Paste the contents to another document;
3. Disable VBA;
4. Change the system date;
5. etc.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-28-2022, 03:32 PM
Charles Kenyon Charles Kenyon is offline VBA to lock a Word File after a certain date Windows 10 VBA to lock a Word File after a certain date Office 2019
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,467
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Paul is right.
See also: No Copies - No Editing for general constraints.

If your work product requires macros to be used you could conceivably add something to essentially blank it after a certain date and furnish the product without this in it after the invoice is paid. To me, this would be simpler than password protection.
Reply With Quote
  #4  
Old 02-28-2022, 05:20 PM
Guessed's Avatar
Guessed Guessed is offline VBA to lock a Word File after a certain date Windows 10 VBA to lock a Word File after a certain date Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,159
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

One way to 'force' 99% of users to enable macros is to save the file as a template and store the desired contents in a building block but leave a notice in the document that tells them they must enable macros to see the contents.

An automacro could then run to replace the notice with the building block if the date hasn't been exceeded.

This method isn't completely foolproof but it might make it harder for them to figure out work arounds. You would probably want to also block Copy/SaveAs/Print options to increase the protection.

As the others have indicated, there will always be workarounds that clever users can use to circumvent your protection methods.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 03-02-2022, 05:59 AM
JWigglesworth JWigglesworth is offline VBA to lock a Word File after a certain date Windows 10 VBA to lock a Word File after a certain date Office 2021
Novice
VBA to lock a Word File after a certain date
 
Join Date: Feb 2022
Posts: 2
JWigglesworth is on a distinguished road
Default

Thank you.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word file expiration date Visor Word VBA 3 10-03-2019 08:35 AM
Checking file date and replacing file if date changes rdross51 Word VBA 0 07-07-2017 02:32 AM
Slicers/ pane_separators in a file - how to lock? Officer_Bierschnitt Excel 0 02-05-2016 02:49 AM
VBA to lock a Word File after a certain date Is it possible to lock a Word file after a certain amount of time? Belsen Word 1 05-23-2014 03:07 AM
VBA to lock a Word File after a certain date How do I lock in a Date in a cell? GatorFan1 Excel 2 12-02-2011 09:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 07:28 PM.


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