#1
|
|||
|
|||
Dynamically protect word doc
Hi,
as in topic, I want to dynamically protect the entire doc except the actual line where the corsor is. I think of somthing like first evaluating the lines with: linesInDoc = ActiveDocument.BuiltInDocumentProperties(wdPropert yLines) or chars with: charsInDoc = ActiveDocument.Characters.Count and based on that inforamtion protect the document. I have a doc with vba script which extends the doc everytime the doc is opened. The script inserts a new line with timestamp and username and below that a user can type text. The goal is, as stated above, to protect everything except the actual line for typing the next comment. The doc looks like in attachment. Thank you in advance! fops |
#2
|
|||
|
|||
You can apply the Group Content Control to the part before your line.
If you want to protect for forms, you need section breaks. I do not recommend that. What you want is, if I am understanding. To insert a timestamp at the end of the document. Allow the user to type anywhere after the timestamp and not before. Am I correct? What do you want to trigger the insertion of the timestamp? Opening the document? A macro or QAT button? |
#3
|
|||
|
|||
Hi,
first thank you for your reply. Quote:
So im in the line below the timestamp. Here a user can type comments. What i want to protect is everything above the comment line where the user is actually typing. When the doc is reopened the process shall start again, so the doc is growing: timestamp -> comment ; timestamp -> comment ; ... And everytime i want to protect everything above the actual comment line. Quote:
Thank you for replying to my post and also for your effort. Greetings Fops Last edited by Charles Kenyon; 03-24-2023 at 08:58 PM. Reason: add quotation markers |
#4
|
|||
|
|||
It is past my bedtime, but if someone else does not write the macro this weekend, I will.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to dynamically grey out a button in customUI.xml in a ribbon of word ? | Ddadoo57 | Word VBA | 2 | 03-13-2023 06:02 AM |
How do I un-protect docs I didn't protect? | doctorduncan | Word | 4 | 05-30-2019 11:09 AM |
Dynamically changing drop-down list based on selection? (Word Form) | laurarem | Word | 1 | 02-21-2013 10:17 PM |
How to dynamically link imbedded Excel chart with source data from Word | TBoz | Excel | 1 | 07-06-2012 05:53 PM |
How do I dynamically update data in a Word Document from a database table | RSchmidt | Word | 1 | 07-14-2011 04:27 PM |