|
|
|
date: Thu, 2 Jul 2009 05:00:06 -0700,
group: microsoft.public.word.newusers
back
Re: Outline Question
I added the macro to the last form field and it is leaving the contents
entered and most of the TOC seems to work properly, but I can't select the
Table of contents when the form is protected. Is this the way it is supposed
to work? Sorry to be such a pain, but as you can guess, I'm not too familiar
with Table of Contents and Form Outlines.
Thanks for the help!
Ken K. - 2191
--
akkrug
"Graham Mayor" wrote:
> Fields in the document will update if you check the calculate on exit check
> box of the last field to be tabbed out of. TOC updates require a bit more
> effort. Run the following macro on exit froma form field. It will unlock the
> form, update the TOC, and relock the form without destroying the content
> entered into the field.
>
> Sub UpdateAllTOC()
> Dim oTOC As TableOfContents
> Dim bProtected As Boolean
> If ActiveDocument.ProtectionType <> wdNoProtection Then
> bProtected = True
> ActiveDocument.Unprotect Password:=""
> End If
> For Each oTOC In ActiveDocument.TablesOfContents
> oTOC.Update
> Next oTOC
> If bProtected = True Then
> ActiveDocument.Protect _
> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
> End If
> End Sub
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> akkrug wrote:
> > I had to unprotect the form for the F9 update to work. This wiped
> > out the text when I re-protected the form. The TOC looks ok before
> > anything is keyed to the fields. One thing I noticed is that the
> > last item in the TOC does NOT have a box with a - sign in it
> > preceding the final section of the form.
> >
> >> If the TOC was created by Word from the Heading styles,
> >> Insert-Reference-Index and Tables, then the TOC is a field. Single
> >> click it, press the <F9> key and update the entire table (or just
> >> page numbers)
> >> The TOC will then be syched with the map
> >>
> >> "akkrug" wrote:
> >>
> >>> I have inherited an outline form that our users would like to be
> >>> able to key as much information as they need to without messing up
> >>> the table of contents. When I addd the form fields to the document
> >>> and then key enough information to generate another page, the table
> >>> of contents and Document map seem to get out of synch. Any idea
> >>> what I might be doing wrong? The users want to keep the same
> >>> numbering scheme but want to be able to key an unlimited amount of
> >>> text.
> >>>
> >>> Thanks for the help!
> >>>
> >>> Ken K.
> >>> --
> >>> akkrug
>
>
>
date: Thu, 2 Jul 2009 08:32:01 -0700
author: akkrug
Re: Outline Question
You can only select form fields in a protected document.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
akkrug wrote:
> I added the macro to the last form field and it is leaving the
> contents entered and most of the TOC seems to work properly, but I
> can't select the Table of contents when the form is protected. Is
> this the way it is supposed to work? Sorry to be such a pain, but as
> you can guess, I'm not too familiar with Table of Contents and Form
> Outlines.
>
> Thanks for the help!
>
> Ken K. - 2191
>
>> Fields in the document will update if you check the calculate on
>> exit check box of the last field to be tabbed out of. TOC updates
>> require a bit more effort. Run the following macro on exit froma
>> form field. It will unlock the form, update the TOC, and relock the
>> form without destroying the content entered into the field.
>>
>> Sub UpdateAllTOC()
>> Dim oTOC As TableOfContents
>> Dim bProtected As Boolean
>> If ActiveDocument.ProtectionType <> wdNoProtection Then
>> bProtected = True
>> ActiveDocument.Unprotect Password:=""
>> End If
>> For Each oTOC In ActiveDocument.TablesOfContents
>> oTOC.Update
>> Next oTOC
>> If bProtected = True Then
>> ActiveDocument.Protect _
>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
>> End If
>> End Sub
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> akkrug wrote:
>>> I had to unprotect the form for the F9 update to work. This wiped
>>> out the text when I re-protected the form. The TOC looks ok before
>>> anything is keyed to the fields. One thing I noticed is that the
>>> last item in the TOC does NOT have a box with a - sign in it
>>> preceding the final section of the form.
>>>
>>>> If the TOC was created by Word from the Heading styles,
>>>> Insert-Reference-Index and Tables, then the TOC is a field. Single
>>>> click it, press the <F9> key and update the entire table (or just
>>>> page numbers)
>>>> The TOC will then be syched with the map
>>>>
>>>> "akkrug" wrote:
>>>>
>>>>> I have inherited an outline form that our users would like to be
>>>>> able to key as much information as they need to without messing up
>>>>> the table of contents. When I addd the form fields to the
>>>>> document and then key enough information to generate another
>>>>> page, the table of contents and Document map seem to get out of
>>>>> synch. Any idea what I might be doing wrong? The users want to
>>>>> keep the same numbering scheme but want to be able to key an
>>>>> unlimited amount of text.
>>>>>
>>>>> Thanks for the help!
>>>>>
>>>>> Ken K.
>>>>> --
>>>>> akkrug
date: Fri, 3 Jul 2009 08:20:28 +0300
author: Graham Mayor
Re: Outline Question
Do I have to put the macro to recalculate the TOC in all fields on the form
to make sure the users activate it or just add it to the last field on the
form? Thanks!
Ken K. - 2191
--
akkrug
"Graham Mayor" wrote:
> You can only select form fields in a protected document.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> akkrug wrote:
> > I added the macro to the last form field and it is leaving the
> > contents entered and most of the TOC seems to work properly, but I
> > can't select the Table of contents when the form is protected. Is
> > this the way it is supposed to work? Sorry to be such a pain, but as
> > you can guess, I'm not too familiar with Table of Contents and Form
> > Outlines.
> >
> > Thanks for the help!
> >
> > Ken K. - 2191
> >
> >> Fields in the document will update if you check the calculate on
> >> exit check box of the last field to be tabbed out of. TOC updates
> >> require a bit more effort. Run the following macro on exit froma
> >> form field. It will unlock the form, update the TOC, and relock the
> >> form without destroying the content entered into the field.
> >>
> >> Sub UpdateAllTOC()
> >> Dim oTOC As TableOfContents
> >> Dim bProtected As Boolean
> >> If ActiveDocument.ProtectionType <> wdNoProtection Then
> >> bProtected = True
> >> ActiveDocument.Unprotect Password:=""
> >> End If
> >> For Each oTOC In ActiveDocument.TablesOfContents
> >> oTOC.Update
> >> Next oTOC
> >> If bProtected = True Then
> >> ActiveDocument.Protect _
> >> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
> >> End If
> >> End Sub
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >>
> >> akkrug wrote:
> >>> I had to unprotect the form for the F9 update to work. This wiped
> >>> out the text when I re-protected the form. The TOC looks ok before
> >>> anything is keyed to the fields. One thing I noticed is that the
> >>> last item in the TOC does NOT have a box with a - sign in it
> >>> preceding the final section of the form.
> >>>
> >>>> If the TOC was created by Word from the Heading styles,
> >>>> Insert-Reference-Index and Tables, then the TOC is a field. Single
> >>>> click it, press the <F9> key and update the entire table (or just
> >>>> page numbers)
> >>>> The TOC will then be syched with the map
> >>>>
> >>>> "akkrug" wrote:
> >>>>
> >>>>> I have inherited an outline form that our users would like to be
> >>>>> able to key as much information as they need to without messing up
> >>>>> the table of contents. When I addd the form fields to the
> >>>>> document and then key enough information to generate another
> >>>>> page, the table of contents and Document map seem to get out of
> >>>>> synch. Any idea what I might be doing wrong? The users want to
> >>>>> keep the same numbering scheme but want to be able to key an
> >>>>> unlimited amount of text.
> >>>>>
> >>>>> Thanks for the help!
> >>>>>
> >>>>> Ken K.
> >>>>> --
> >>>>> akkrug
>
>
>
date: Mon, 6 Jul 2009 07:31:01 -0700
author: akkrug
Re: Outline Question
I would be inclined to put a button on a toolbar (Word up to 2003) however
it needs to be activated from a field that comes after anything that may
contribute to the TOC that you know the users will be required to complete.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
akkrug wrote:
> Do I have to put the macro to recalculate the TOC in all fields on
> the form to make sure the users activate it or just add it to the
> last field on the form? Thanks!
>
> Ken K. - 2191
>
>> You can only select form fields in a protected document.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> akkrug wrote:
>>> I added the macro to the last form field and it is leaving the
>>> contents entered and most of the TOC seems to work properly, but I
>>> can't select the Table of contents when the form is protected. Is
>>> this the way it is supposed to work? Sorry to be such a pain, but
>>> as you can guess, I'm not too familiar with Table of Contents and
>>> Form Outlines.
>>>
>>> Thanks for the help!
>>>
>>> Ken K. - 2191
>>>
>>>> Fields in the document will update if you check the calculate on
>>>> exit check box of the last field to be tabbed out of. TOC updates
>>>> require a bit more effort. Run the following macro on exit froma
>>>> form field. It will unlock the form, update the TOC, and relock the
>>>> form without destroying the content entered into the field.
>>>>
>>>> Sub UpdateAllTOC()
>>>> Dim oTOC As TableOfContents
>>>> Dim bProtected As Boolean
>>>> If ActiveDocument.ProtectionType <> wdNoProtection Then
>>>> bProtected = True
>>>> ActiveDocument.Unprotect Password:=""
>>>> End If
>>>> For Each oTOC In ActiveDocument.TablesOfContents
>>>> oTOC.Update
>>>> Next oTOC
>>>> If bProtected = True Then
>>>> ActiveDocument.Protect _
>>>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
>>>> End If
>>>> End Sub
>>>> --
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>> Graham Mayor - Word MVP
>>>>
>>>> My web site www.gmayor.com
>>>> Word MVP web site http://word.mvps.org
>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>
>>>>
>>>> akkrug wrote:
>>>>> I had to unprotect the form for the F9 update to work. This wiped
>>>>> out the text when I re-protected the form. The TOC looks ok
>>>>> before anything is keyed to the fields. One thing I noticed is
>>>>> that the last item in the TOC does NOT have a box with a - sign
>>>>> in it preceding the final section of the form.
>>>>>
>>>>>> If the TOC was created by Word from the Heading styles,
>>>>>> Insert-Reference-Index and Tables, then the TOC is a field.
>>>>>> Single click it, press the <F9> key and update the entire table
>>>>>> (or just page numbers)
>>>>>> The TOC will then be syched with the map
>>>>>>
>>>>>> "akkrug" wrote:
>>>>>>
>>>>>>> I have inherited an outline form that our users would like to be
>>>>>>> able to key as much information as they need to without messing
>>>>>>> up the table of contents. When I addd the form fields to the
>>>>>>> document and then key enough information to generate another
>>>>>>> page, the table of contents and Document map seem to get out of
>>>>>>> synch. Any idea what I might be doing wrong? The users want to
>>>>>>> keep the same numbering scheme but want to be able to key an
>>>>>>> unlimited amount of text.
>>>>>>>
>>>>>>> Thanks for the help!
>>>>>>>
>>>>>>> Ken K.
>>>>>>> --
>>>>>>> akkrug
date: Mon, 6 Jul 2009 17:38:03 +0300
author: Graham Mayor
Re: Outline Question
Great idea!! I added your macro to a new template and put a button on the
template to run it. Thanks for all the help!!
Ken K. - 2191
--
akkrug
"Graham Mayor" wrote:
> I would be inclined to put a button on a toolbar (Word up to 2003) however
> it needs to be activated from a field that comes after anything that may
> contribute to the TOC that you know the users will be required to complete.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> akkrug wrote:
> > Do I have to put the macro to recalculate the TOC in all fields on
> > the form to make sure the users activate it or just add it to the
> > last field on the form? Thanks!
> >
> > Ken K. - 2191
> >
> >> You can only select form fields in a protected document.
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >>
> >> akkrug wrote:
> >>> I added the macro to the last form field and it is leaving the
> >>> contents entered and most of the TOC seems to work properly, but I
> >>> can't select the Table of contents when the form is protected. Is
> >>> this the way it is supposed to work? Sorry to be such a pain, but
> >>> as you can guess, I'm not too familiar with Table of Contents and
> >>> Form Outlines.
> >>>
> >>> Thanks for the help!
> >>>
> >>> Ken K. - 2191
> >>>
> >>>> Fields in the document will update if you check the calculate on
> >>>> exit check box of the last field to be tabbed out of. TOC updates
> >>>> require a bit more effort. Run the following macro on exit froma
> >>>> form field. It will unlock the form, update the TOC, and relock the
> >>>> form without destroying the content entered into the field.
> >>>>
> >>>> Sub UpdateAllTOC()
> >>>> Dim oTOC As TableOfContents
> >>>> Dim bProtected As Boolean
> >>>> If ActiveDocument.ProtectionType <> wdNoProtection Then
> >>>> bProtected = True
> >>>> ActiveDocument.Unprotect Password:=""
> >>>> End If
> >>>> For Each oTOC In ActiveDocument.TablesOfContents
> >>>> oTOC.Update
> >>>> Next oTOC
> >>>> If bProtected = True Then
> >>>> ActiveDocument.Protect _
> >>>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
> >>>> End If
> >>>> End Sub
> >>>> --
> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>> Graham Mayor - Word MVP
> >>>>
> >>>> My web site www.gmayor.com
> >>>> Word MVP web site http://word.mvps.org
> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>
> >>>>
> >>>> akkrug wrote:
> >>>>> I had to unprotect the form for the F9 update to work. This wiped
> >>>>> out the text when I re-protected the form. The TOC looks ok
> >>>>> before anything is keyed to the fields. One thing I noticed is
> >>>>> that the last item in the TOC does NOT have a box with a - sign
> >>>>> in it preceding the final section of the form.
> >>>>>
> >>>>>> If the TOC was created by Word from the Heading styles,
> >>>>>> Insert-Reference-Index and Tables, then the TOC is a field.
> >>>>>> Single click it, press the <F9> key and update the entire table
> >>>>>> (or just page numbers)
> >>>>>> The TOC will then be syched with the map
> >>>>>>
> >>>>>> "akkrug" wrote:
> >>>>>>
> >>>>>>> I have inherited an outline form that our users would like to be
> >>>>>>> able to key as much information as they need to without messing
> >>>>>>> up the table of contents. When I addd the form fields to the
> >>>>>>> document and then key enough information to generate another
> >>>>>>> page, the table of contents and Document map seem to get out of
> >>>>>>> synch. Any idea what I might be doing wrong? The users want to
> >>>>>>> keep the same numbering scheme but want to be able to key an
> >>>>>>> unlimited amount of text.
> >>>>>>>
> >>>>>>> Thanks for the help!
> >>>>>>>
> >>>>>>> Ken K.
> >>>>>>> --
> >>>>>>> akkrug
>
>
>
date: Mon, 6 Jul 2009 08:13:02 -0700
author: akkrug
Re: Outline Question
Thanks again Graham. The users like the TOC, but now they want to add
different sections with the same numbering scheme. Can this be done or do I
have to start the TOC over again?
Thanks!
kkrug
"Graham Mayor" wrote:
> I would be inclined to put a button on a toolbar (Word up to 2003) however
> it needs to be activated from a field that comes after anything that may
> contribute to the TOC that you know the users will be required to complete.
>
> --
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>
>
> akkrug wrote:
> > Do I have to put the macro to recalculate the TOC in all fields on
> > the form to make sure the users activate it or just add it to the
> > last field on the form? Thanks!
> >
> > Ken K. - 2191
> >
> >> You can only select form fields in a protected document.
> >>
> >> --
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >> Graham Mayor - Word MVP
> >>
> >> My web site www.gmayor.com
> >> Word MVP web site http://word.mvps.org
> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>
> >>
> >> akkrug wrote:
> >>> I added the macro to the last form field and it is leaving the
> >>> contents entered and most of the TOC seems to work properly, but I
> >>> can't select the Table of contents when the form is protected. Is
> >>> this the way it is supposed to work? Sorry to be such a pain, but
> >>> as you can guess, I'm not too familiar with Table of Contents and
> >>> Form Outlines.
> >>>
> >>> Thanks for the help!
> >>>
> >>> Ken K. - 2191
> >>>
> >>>> Fields in the document will update if you check the calculate on
> >>>> exit check box of the last field to be tabbed out of. TOC updates
> >>>> require a bit more effort. Run the following macro on exit froma
> >>>> form field. It will unlock the form, update the TOC, and relock the
> >>>> form without destroying the content entered into the field.
> >>>>
> >>>> Sub UpdateAllTOC()
> >>>> Dim oTOC As TableOfContents
> >>>> Dim bProtected As Boolean
> >>>> If ActiveDocument.ProtectionType <> wdNoProtection Then
> >>>> bProtected = True
> >>>> ActiveDocument.Unprotect Password:=""
> >>>> End If
> >>>> For Each oTOC In ActiveDocument.TablesOfContents
> >>>> oTOC.Update
> >>>> Next oTOC
> >>>> If bProtected = True Then
> >>>> ActiveDocument.Protect _
> >>>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
> >>>> End If
> >>>> End Sub
> >>>> --
> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>> Graham Mayor - Word MVP
> >>>>
> >>>> My web site www.gmayor.com
> >>>> Word MVP web site http://word.mvps.org
> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
> >>>>
> >>>>
> >>>> akkrug wrote:
> >>>>> I had to unprotect the form for the F9 update to work. This wiped
> >>>>> out the text when I re-protected the form. The TOC looks ok
> >>>>> before anything is keyed to the fields. One thing I noticed is
> >>>>> that the last item in the TOC does NOT have a box with a - sign
> >>>>> in it preceding the final section of the form.
> >>>>>
> >>>>>> If the TOC was created by Word from the Heading styles,
> >>>>>> Insert-Reference-Index and Tables, then the TOC is a field.
> >>>>>> Single click it, press the <F9> key and update the entire table
> >>>>>> (or just page numbers)
> >>>>>> The TOC will then be syched with the map
> >>>>>>
> >>>>>> "akkrug" wrote:
> >>>>>>
> >>>>>>> I have inherited an outline form that our users would like to be
> >>>>>>> able to key as much information as they need to without messing
> >>>>>>> up the table of contents. When I addd the form fields to the
> >>>>>>> document and then key enough information to generate another
> >>>>>>> page, the table of contents and Document map seem to get out of
> >>>>>>> synch. Any idea what I might be doing wrong? The users want to
> >>>>>>> keep the same numbering scheme but want to be able to key an
> >>>>>>> unlimited amount of text.
> >>>>>>>
> >>>>>>> Thanks for the help!
> >>>>>>>
> >>>>>>> Ken K.
> >>>>>>> --
> >>>>>>> akkrug
>
>
>
date: Tue, 7 Jul 2009 08:41:02 -0700
author: akkrug
Re: Outline Question
F9 will update the TOC and add (or remove) any new headings providing they
have been formatted with the correct Heading Style.
--
Terry Farrell - MSWord MVP
"akkrug" wrote in message
news:8F356E15-2656-4549-A6E7-634E7F3494FE@microsoft.com...
> Thanks again Graham. The users like the TOC, but now they want to add
> different sections with the same numbering scheme. Can this be done or do
> I
> have to start the TOC over again?
>
> Thanks!
>
> kkrug
>
>
> "Graham Mayor" wrote:
>
>> I would be inclined to put a button on a toolbar (Word up to 2003)
>> however
>> it needs to be activated from a field that comes after anything that may
>> contribute to the TOC that you know the users will be required to
>> complete.
>>
>> --
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>
>>
>> akkrug wrote:
>> > Do I have to put the macro to recalculate the TOC in all fields on
>> > the form to make sure the users activate it or just add it to the
>> > last field on the form? Thanks!
>> >
>> > Ken K. - 2191
>> >
>> >> You can only select form fields in a protected document.
>> >>
>> >> --
>> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >> Graham Mayor - Word MVP
>> >>
>> >> My web site www.gmayor.com
>> >> Word MVP web site http://word.mvps.org
>> >> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >>
>> >>
>> >> akkrug wrote:
>> >>> I added the macro to the last form field and it is leaving the
>> >>> contents entered and most of the TOC seems to work properly, but I
>> >>> can't select the Table of contents when the form is protected. Is
>> >>> this the way it is supposed to work? Sorry to be such a pain, but
>> >>> as you can guess, I'm not too familiar with Table of Contents and
>> >>> Form Outlines.
>> >>>
>> >>> Thanks for the help!
>> >>>
>> >>> Ken K. - 2191
>> >>>
>> >>>> Fields in the document will update if you check the calculate on
>> >>>> exit check box of the last field to be tabbed out of. TOC updates
>> >>>> require a bit more effort. Run the following macro on exit froma
>> >>>> form field. It will unlock the form, update the TOC, and relock the
>> >>>> form without destroying the content entered into the field.
>> >>>>
>> >>>> Sub UpdateAllTOC()
>> >>>> Dim oTOC As TableOfContents
>> >>>> Dim bProtected As Boolean
>> >>>> If ActiveDocument.ProtectionType <> wdNoProtection Then
>> >>>> bProtected = True
>> >>>> ActiveDocument.Unprotect Password:=""
>> >>>> End If
>> >>>> For Each oTOC In ActiveDocument.TablesOfContents
>> >>>> oTOC.Update
>> >>>> Next oTOC
>> >>>> If bProtected = True Then
>> >>>> ActiveDocument.Protect _
>> >>>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
>> >>>> End If
>> >>>> End Sub
>> >>>> --
>> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >>>> Graham Mayor - Word MVP
>> >>>>
>> >>>> My web site www.gmayor.com
>> >>>> Word MVP web site http://word.mvps.org
>> >>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>> >>>>
>> >>>>
>> >>>> akkrug wrote:
>> >>>>> I had to unprotect the form for the F9 update to work. This wiped
>> >>>>> out the text when I re-protected the form. The TOC looks ok
>> >>>>> before anything is keyed to the fields. One thing I noticed is
>> >>>>> that the last item in the TOC does NOT have a box with a - sign
>> >>>>> in it preceding the final section of the form.
>> >>>>>
>> >>>>>> If the TOC was created by Word from the Heading styles,
>> >>>>>> Insert-Reference-Index and Tables, then the TOC is a field.
>> >>>>>> Single click it, press the <F9> key and update the entire table
>> >>>>>> (or just page numbers)
>> >>>>>> The TOC will then be syched with the map
>> >>>>>>
>> >>>>>> "akkrug" wrote:
>> >>>>>>
>> >>>>>>> I have inherited an outline form that our users would like to be
>> >>>>>>> able to key as much information as they need to without messing
>> >>>>>>> up the table of contents. When I addd the form fields to the
>> >>>>>>> document and then key enough information to generate another
>> >>>>>>> page, the table of contents and Document map seem to get out of
>> >>>>>>> synch. Any idea what I might be doing wrong? The users want to
>> >>>>>>> keep the same numbering scheme but want to be able to key an
>> >>>>>>> unlimited amount of text.
>> >>>>>>>
>> >>>>>>> Thanks for the help!
>> >>>>>>>
>> >>>>>>> Ken K.
>> >>>>>>> --
>> >>>>>>> akkrug
>>
>>
>>
date: Tue, 7 Jul 2009 17:55:10 +0100
author: Terry Farrell
Re: Outline Question
As should the macro.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Terry Farrell wrote:
> F9 will update the TOC and add (or remove) any new headings providing
> they have been formatted with the correct Heading Style.
>
>
> "akkrug" wrote in message
> news:8F356E15-2656-4549-A6E7-634E7F3494FE@microsoft.com...
>> Thanks again Graham. The users like the TOC, but now they want to add
>> different sections with the same numbering scheme. Can this be done
>> or do I
>> have to start the TOC over again?
>>
>> Thanks!
>>
>> kkrug
>>
>>
>> "Graham Mayor" wrote:
>>
>>> I would be inclined to put a button on a toolbar (Word up to 2003)
>>> however
>>> it needs to be activated from a field that comes after anything
>>> that may contribute to the TOC that you know the users will be
>>> required to complete.
>>>
>>> --
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>> Graham Mayor - Word MVP
>>>
>>> My web site www.gmayor.com
>>> Word MVP web site http://word.mvps.org
>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>
>>>
>>> akkrug wrote:
>>>> Do I have to put the macro to recalculate the TOC in all fields on
>>>> the form to make sure the users activate it or just add it to the
>>>> last field on the form? Thanks!
>>>>
>>>> Ken K. - 2191
>>>>
>>>>> You can only select form fields in a protected document.
>>>>>
>>>>> --
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>> Graham Mayor - Word MVP
>>>>>
>>>>> My web site www.gmayor.com
>>>>> Word MVP web site http://word.mvps.org
>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>
>>>>>
>>>>> akkrug wrote:
>>>>>> I added the macro to the last form field and it is leaving the
>>>>>> contents entered and most of the TOC seems to work properly, but
>>>>>> I can't select the Table of contents when the form is protected.
>>>>>> Is this the way it is supposed to work? Sorry to be such a
>>>>>> pain, but as you can guess, I'm not too familiar with Table of
>>>>>> Contents and Form Outlines.
>>>>>>
>>>>>> Thanks for the help!
>>>>>>
>>>>>> Ken K. - 2191
>>>>>>
>>>>>>> Fields in the document will update if you check the calculate on
>>>>>>> exit check box of the last field to be tabbed out of. TOC
>>>>>>> updates require a bit more effort. Run the following macro on
>>>>>>> exit froma form field. It will unlock the form, update the TOC,
>>>>>>> and relock the form without destroying the content entered into
>>>>>>> the field. Sub UpdateAllTOC()
>>>>>>> Dim oTOC As TableOfContents
>>>>>>> Dim bProtected As Boolean
>>>>>>> If ActiveDocument.ProtectionType <> wdNoProtection Then
>>>>>>> bProtected = True
>>>>>>> ActiveDocument.Unprotect Password:=""
>>>>>>> End If
>>>>>>> For Each oTOC In ActiveDocument.TablesOfContents
>>>>>>> oTOC.Update
>>>>>>> Next oTOC
>>>>>>> If bProtected = True Then
>>>>>>> ActiveDocument.Protect _
>>>>>>> Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
>>>>>>> End If
>>>>>>> End Sub
>>>>>>> --
>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>> Graham Mayor - Word MVP
>>>>>>>
>>>>>>> My web site www.gmayor.com
>>>>>>> Word MVP web site http://word.mvps.org
>>>>>>> <>>< ><<> ><<> <>>< ><<> <>>< <>><<>
>>>>>>>
>>>>>>>
>>>>>>> akkrug wrote:
>>>>>>>> I had to unprotect the form for the F9 update to work. This
>>>>>>>> wiped out the text when I re-protected the form. The TOC
>>>>>>>> looks ok before anything is keyed to the fields. One thing I
>>>>>>>> noticed is that the last item in the TOC does NOT have a box
>>>>>>>> with a - sign in it preceding the final section of the form.
>>>>>>>>
>>>>>>>>> If the TOC was created by Word from the Heading styles,
>>>>>>>>> Insert-Reference-Index and Tables, then the TOC is a field.
>>>>>>>>> Single click it, press the <F9> key and update the entire
>>>>>>>>> table (or just page numbers)
>>>>>>>>> The TOC will then be syched with the map
>>>>>>>>>
>>>>>>>>> "akkrug" wrote:
>>>>>>>>>
>>>>>>>>>> I have inherited an outline form that our users would like
>>>>>>>>>> to be able to key as much information as they need to
>>>>>>>>>> without messing up the table of contents. When I addd the
>>>>>>>>>> form fields to the document and then key enough information
>>>>>>>>>> to generate another page, the table of contents and Document
>>>>>>>>>> map seem to get out of synch. Any idea what I might be
>>>>>>>>>> doing wrong? The users want to keep the same numbering
>>>>>>>>>> scheme but want to be able to key an unlimited amount of
>>>>>>>>>> text. Thanks for the help!
>>>>>>>>>>
>>>>>>>>>> Ken K.
>>>>>>>>>> --
>>>>>>>>>> akkrug
date: Wed, 8 Jul 2009 08:44:00 +0300
author: Graham Mayor
|
|