Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-13-2017, 09:56 AM
palmiema palmiema is offline Update captions when editing restrictions are enabled Windows 7 64bit Update captions when editing restrictions are enabled Office 2010 64bit
Novice
Update captions when editing restrictions are enabled
 
Join Date: Aug 2016
Posts: 10
palmiema is on a distinguished road
Default Update captions when editing restrictions are enabled


Hello

I have a Word 2010 document that has captions in it. The document also has editing restrictions enabled. I want users to be able to update all captions throughout the document simultaneously by pressing 'Ctrl+A' and then 'F9'.

This method works when the editing restrictions are disabled. It also updates the Table of Contents, Table of Figures, and Cross References too.

However, when the editing restrictions are turned on this method will not work to update the captions and other hyperlinks, etc.. Is there a way to make the simultaneous update for these items work? Please note that all captions are set up so that 'everyone' can edit them.

Any pointers for solutions or troubleshooting are most appreciated.

Best,

MJP
Reply With Quote
  #2  
Old 02-14-2017, 04:04 AM
macropod's Avatar
macropod macropod is offline Update captions when editing restrictions are enabled Windows 7 64bit Update captions when editing restrictions are enabled Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
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

If you're using formfields, checking each one's 'calculate on exit' property will achieve the desired result - without the need for Ctrl-A, F9 - except for the Table of Contents & Table of Figures. There is a convoluted workaround for those, too, however. That workaround involves putting each them at the end of the document, inside SET fields and, at where you want the Table of Contents & Table of Figures to appear, inserting a cross-reference to the relevant SET field's bookmark.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 02-14-2017, 04:06 PM
palmiema palmiema is offline Update captions when editing restrictions are enabled Windows 7 64bit Update captions when editing restrictions are enabled Office 2010 64bit
Novice
Update captions when editing restrictions are enabled
 
Join Date: Aug 2016
Posts: 10
palmiema is on a distinguished road
Default

Thank you. However, I don't think I am using form fields. I had a regular Word document with captions inserted and I added the editing restrictions by going to the developer tab, enabling restrictions, and highlighting the portions of text that I want the users to be able to change, and checking the 'everyone' box to allow anyone to change the highlighted text. Are captions the same as form fields? If not, is it possible to somehow update the captions as described above when I have this sort of setup? Thank you for the clarification
Reply With Quote
  #4  
Old 02-14-2017, 06:57 PM
Charles Kenyon Charles Kenyon is offline Update captions when editing restrictions are enabled Windows 10 Update captions when editing restrictions are enabled Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
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

Not without a macro. Will you be able to use macros where this will be used? If it is going out to remote locations you should not count on this.

No, although captions are Fields, they are not formfields.

Last edited by Charles Kenyon; 02-15-2017 at 01:28 AM.
Reply With Quote
  #5  
Old 02-14-2017, 11:27 PM
palmiema palmiema is offline Update captions when editing restrictions are enabled Windows 7 64bit Update captions when editing restrictions are enabled Office 2010 64bit
Novice
Update captions when editing restrictions are enabled
 
Join Date: Aug 2016
Posts: 10
palmiema is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
Not without a macro. Will you be able to use macros where this will be used? If it is going out to remote locations you should not count on this.
Yes, we will be able to use macros and the document will not be sent to remote locations. Can you please provide more information about how to use macros to accomplish this task? Thank you much.
Reply With Quote
  #6  
Old 02-15-2017, 01:49 AM
Charles Kenyon Charles Kenyon is offline Update captions when editing restrictions are enabled Windows 10 Update captions when editing restrictions are enabled Office 2013
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,125
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

I'm sure that Paul or others could improve on this. You would include the password for modification in the UpdateCaptions routine. In this code, it is set as "xyz."


Code:
Sub protectDocNoMods(Str_password As String)
'
'
    ActiveDocument.Protect Password:=Str_password, _
        NoReset:=False, Type:= _
        wdAllowOnlyReading, _
        UseIRM:=False, EnforceStyleLock:=False
End Sub

Sub UnprotectDocNoMods(Str_password As String)
'
    ActiveDocument.Unprotect (Str_password)
End Sub

Sub UpdateCaptions()
    Dim Str_password As String
    Str_password = "xyz"
    Call UnprotectDocNoMods(Str_password)
' From Greg Maxey 2013-09-30
' http://answers.microsoft.com/en-us/office/forum/office_2007-word/how-to-update-all-fields-in-a-document-at-once/54b43181-0ea7-4abc-bfb9-e0555125dfe5?page=3
'
    Dim rngStory As Word.Range, lngJunk As Long, oShp As Shape
    Dim oToc As TableOfContents, oTof As TableOfFigures, oToa As TableOfAuthorities
    '
    lngJunk = ActiveDocument.Sections(1).Headers(1).Range.StoryType
    For Each rngStory In ActiveDocument.StoryRanges
      'Iterate through all linked stories
      Do
        On Error Resume Next
        rngStory.Fields.Update
        Select Case rngStory.StoryType
          Case 6, 7, 8, 9, 10, 11
            If rngStory.ShapeRange.Count > 0 Then
              For Each oShp In rngStory.ShapeRange
                If oShp.TextFrame.HasText Then
                   oShp.TextFrame.TextRange.Fields.Update
                End If
              Next
            End If
          Case Else
            'Do Nothing
        End Select
        On Error GoTo 0
        'Get next linked story (if any)
        Set rngStory = rngStory.NextStoryRange
      Loop Until rngStory Is Nothing
      For Each oToc In ActiveDocument.TablesOfContents
        oToc.Update
      Next oToc
      For Each oTof In ActiveDocument.TablesOfFigures ' Added by CKK
        oTof.Update
      Next oTof
    '  For Each oToa In ActiveDocument.TablesOfAuthorities ' Added by CKK
    '    oToa.Update
    '  Next oToa
    Next
'
    Call protectDocNoMods(Str_password)
'
End Sub
This was cobbled together from other code I have on hand. I have not tested the above because I am supposed to be asleep right now. See also Installing Macros which has some excellent code for updating all fields in a document that could be incorporated instead.
Reply With Quote
  #7  
Old 02-16-2017, 12:12 PM
palmiema palmiema is offline Update captions when editing restrictions are enabled Windows 7 64bit Update captions when editing restrictions are enabled Office 2010 64bit
Novice
Update captions when editing restrictions are enabled
 
Join Date: Aug 2016
Posts: 10
palmiema is on a distinguished road
Default

Thanks so much, Charles. I will try out this code, troubleshoot as necessary, and consult the link you provided. Thanks again.
Reply With Quote
Reply

Tags
editing restrictions, update all, updating captions



Similar Threads
Thread Thread Starter Forum Replies Last Post
Update captions when editing restrictions are enabled VBA to insert captions without appending to existing captions Marrick13 Word VBA 17 03-21-2023 07:51 PM
Update Userform Captions, TextBoxes, Command buttons From Excel dan88 Word VBA 3 05-22-2016 08:59 AM
Update captions when editing restrictions are enabled Captions: Changing captions in Appendix update all captions carnestw Word 3 10-27-2015 12:34 PM
Need 2 embedded charts to update upon editing data in one SRichardson Excel 1 02-19-2014 12:44 AM
How to edit shape with "editing restrictions" turned on jackj22 Word 2 03-05-2012 01:48 PM

Other Forums: Access Forums

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


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