Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-22-2019, 06:14 AM
inlanoche inlanoche is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Novice
Protecting only 1 section
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default Protecting only 1 section

Our company wants to be pretty specific on QC of documents. Because of this they have specific guidelines that they want followed. Because of this I have been tasked with creating some 'buttons' on a new ribbon.


long story short, they also want to track who does what QC role and when. I looked up protecting a section and that seemed to be the right direction, but when you initiate that protection level, I cannot do track changes...

Basically, I am hoping to protect a specific section in the document from being edited, but still being able to work in the rest of the document. Is this possible?
Reply With Quote
  #2  
Old 05-22-2019, 01:34 PM
inlanoche inlanoche is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Novice
Protecting only 1 section
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default

while waiting on a reply for this, I have been looking at other ways to do this. One such way I came across is to use custom document properties. I think I may have set something up on these lines, but I seem to be finding that each property may have a limit to it (255 chars)? Can this be confirmed for word 2016 (office 365)? If so, another road block... unless I try and string together several properties...
Reply With Quote
  #3  
Old 05-22-2019, 03:50 PM
macropod's Avatar
macropod macropod is offline Protecting only 1 section Windows 7 64bit Protecting only 1 section Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

What you could do is to insert the protected content into a separate document to which you apply 'filling in forms' protection. Then, at the point where that content is to appear in your main document, insert a link to the protected document via Insert|Text from file>Insert as Link. That way, you can still use 'Track Changes' for the unprotected content. Although users can still edit in the linked area, it's impossible for them to preserve that content against the content reverting any time Word refreshes fields in the document (e.g. when a print preview is done or the document is printed). Provided the document containing the protected content is stored in a folder Word can access for all users, there shouldn't be any problems.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 05-22-2019, 05:21 PM
Guessed's Avatar
Guessed Guessed is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
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

I'm not exactly sure on your requirements especially with your mention of custom doc properties and how that could be used.

The subtle protection method I would explore is to group the text - which puts it into an invisible content control and stops accidental editing of it. You can then also set the properties of that CC so it also prevents deletion of that grouped text.

You will need to show the Developer Tab to explore this option of protecting the text.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #5  
Old 05-22-2019, 05:57 PM
macropod's Avatar
macropod macropod is offline Protecting only 1 section Windows 7 64bit Protecting only 1 section Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Indeed, one could use an ordinary content control as a placeholder for the text and set it's properties to 'cannot be deleted' and 'cannot be edited'. Without some form of protection, though, it's easily circumvented.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 05-23-2019, 07:18 AM
inlanoche inlanoche is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Novice
Protecting only 1 section
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default

the idea is to not modify the document too much to track the QC process. This data does not have to be visible to those working on it, but should be easy to check/output if required. The problem is that with the section idea I thought of at first, if I don't protected, someone could accidentally change some of the info. If I protect it (form protection) then you cannot do comments, even if the other sections have the form protection turned off. The section idea was nice, since I put a stamp at the beginning to mark it, and therefore could track, output, and later delete it from the document without messing with the other text.

I would prefer to stay away from a separate file storing this info, or at least till they work out a more automated way to handle the files. I can see someone taking the file home to work on (off the network) then having a new QC tracking file created and lost.

I might work out the custom property method. Each entry would be at most 50 chars (most likely less). If I can count the number of chars in the property, then when 200+ create a new one with incrementing names. Not idea, but I can make it work.
Reply With Quote
  #7  
Old 05-23-2019, 02:59 PM
macropod's Avatar
macropod macropod is offline Protecting only 1 section Windows 7 64bit Protecting only 1 section Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

As I said, you could use a text content control and set it's properties to 'cannot be deleted' and 'cannot be edited'. Someone would have to be quite deliberate about messing with it to change anything. Another option would be to programmatically add the document to the document via a Document Variable. Such content is easily displayed by inserting a DOCVARIABLE field referencing the variable, but can only be changed programmatically. The downside is that you can't insert formatted content into a Document Variable.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 05-24-2019, 07:14 AM
inlanoche inlanoche is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Novice
Protecting only 1 section
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default

ok, I will look more into text content control.

The information I am looking to store would be entered programmatically anyway, and I think I have a good handle on incrementing custom properties (I'm hoping that is what you meant by DOCVARIABLE, but I will look that up). Thanks!
Reply With Quote
  #9  
Old 05-24-2019, 03:59 PM
macropod's Avatar
macropod macropod is offline Protecting only 1 section Windows 7 64bit Protecting only 1 section Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

Document variables and custom document properties are quite different. For one thing, custom document properties can be edited via the GUI, document variables cannot.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 05-28-2019, 09:17 AM
kilroy kilroy is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Competent Performer
 
Join Date: Sep 2016
Location: Southern Ontario
Posts: 118
kilroy is on a distinguished road
Default

I use the following to make sure guys here aren't changing stuff they shouldn't. when they close the new document it adds their name and date/time to the footer. It then performs a comparison to the original template and saves it to a specified folder. Also, each time the new document is opened and closed it does the comparison again and captures who is doing it in the footer.

Code:
Private Sub Document_New()
  Dim oDoc As Document
Application.FileDialog(msoFileDialogSaveAs).InitialFileName = "Pick a name for the save function" ' Mine is the same as the template
Dim choice As Integer
choice = Application.FileDialog(msoFileDialogSaveAs).Show
If choice <> 0 Then
    FileName = Application.FileDialog(msoFileDialogSaveAs).SelectedItems(1)
    Application.FileDialog(msoFileDialogSaveAs).Execute
 
Set oDoc = ActiveDocument
End If
End Sub
Private Sub Document_Close()
 Dim strPath As String
Dim lFmt As Long
Dim strOriginal As String
    strPath = "Your chosen save folder" ' I created a folder on the company drive only I know where it is
    Application.ScreenUpdating = False
 
 ActiveDocument.Compare Name:= "C:\Users\yourname\Desktop\Personal\VBA test\Form XX-XX for project .docx", _ 'Your Template document name and location
 CompareTarget:=wdCompareTargetNew
Set compareTargetNew = ActiveDocument
 With ActiveDocument
       strOriginal = .FullName
    End With
 
With ActiveDocument.Sections(1)
    .Footers(wdHeaderFooterPrimary).Range.Select
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "USERNAME  ", PreserveFormatting:=True
    Selection.TypeText Text:=vbTab
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "DATE  \@ ""dddd, MMMM d, yyyy"" ", PreserveFormatting:=True
    Selection.TypeText Text:=vbTab
    Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
        "TIME  \@ ""h:mm:ss am/pm"" ", PreserveFormatting:=True
 
   With ActiveDocument
        .SaveAs2 FileName:=strPath & "/" & .Name, _
                FileFormat:=lFmt, _
                AddToRecentFiles:=False
       .SaveAs2 FileName:=strOriginal, _
                 FileFormat:=lFmt, _
                 AddToRecentFiles:=False
   End With
    Application.ScreenUpdating = False
    ActiveDocument.Close
End With
End Sub

Last edited by kilroy; 05-28-2019 at 10:58 AM. Reason: spelling
Reply With Quote
  #11  
Old 05-29-2019, 05:58 AM
inlanoche inlanoche is offline Protecting only 1 section Windows 10 Protecting only 1 section Office 2016
Novice
Protecting only 1 section
 
Join Date: Apr 2019
Posts: 14
inlanoche is on a distinguished road
Default

thanks for the example. It looks like this only tracks the last user (overwriting the previous footer?) I'm looking to track everyone that makes a change to the document, in a custom way. I also don't want to mess with footers that may exist in the document.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Protecting only 1 section Protecting Forms Edward_Musheyev Word 2 07-18-2016 11:56 AM
section page numbers reverting to following on from previous section after generating index cloudtrapezer Word 1 06-25-2015 01:16 AM
Protecting only 1 section Anytime a section of TOC is updated, the picture stored in that section gets copied into my TOC. brap367 Word 1 12-15-2014 12:49 PM
Protecting only 1 section Deleting section break and retaining section properties New Daddy Word 6 02-03-2014 07:09 PM
Protecting documents jeljohns Word 3 09-06-2013 07:36 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:11 PM.


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