Results 1 to 4 of 4
  1. #1
    Star Lounger
    Join Date
    Aug 2015
    Posts
    98
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Word cannot undo this action. Do you want to continue? Word 2010

    Hi All
    I am converting drafting note wording within the body of the document to footnotes using a macro. Unfortunately, now when I try to update the table of contents I get the message 'Word cannot undo this action. Do you want to continue? When I say yes, it does nothing at all. The macro I am using is as follows:

    Sub AddFootNote()
    NewFootNote = Selection & Chr(44) & Chr(32)
    With Selection
    With .FootnoteOptions
    .Location = wdBottomOfPage
    .NumberingRule = wdRestartContinuous
    .StartingNumber = 1
    .NumberStyle = wdNoteNumberStyleArabic
    End With
    .Footnotes.Add Range:=Selection.Range, Text:=NewFootNote
    End With
    With ActiveDocument.Styles("Footnote Text").Font
    .Italic = True
    End With
    End Sub


    Can anyone help me on this please. Many thanks.

  2. #2
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    How are you updating the TOC - there's nothing to do so in your code. Using:
    ActiveDocument.TablesOfContents(1).Update
    and:
    ActiveDocument.Fields.Update
    I am unable to reproduce the issue.

    FWIW your code could be reduced to:
    Code:
    Sub AddFootNote()
    With Selection
      .Footnotes.Add Range:=.Range, Text:=.Text & ", "
      With .FootnoteOptions
        .Location = wdBottomOfPage
        .NumberingRule = wdRestartContinuous
        .StartingNumber = 1
        .NumberStyle = wdNoteNumberStyleArabic
      End With
    End With
    ActiveDocument.Styles("Footnote Text").Font.Italic = True
    End Sub
    though I don't believe it is necessary or desirable to use any more than:
    Code:
    With Selection
      .Footnotes.Add Range:=.Range, Text:=.Text & ", "
    End With
    for every footnote.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  3. #3
    Star Lounger
    Join Date
    Aug 2015
    Posts
    98
    Thanks
    14
    Thanked 0 Times in 0 Posts
    Hi Macropod, I have only been using the macro to highlight the text I need then click an icon on the quick access toolbar to convert the text to a footnote then when I have finished the document with any other amends I need to make I then go back to the TOC and press F9 then F4 - it is when I am pressing F9 F4 that I am getting the word cannot undo this action message. I've since done another test document whereby I didn't use the macro at all and just copied the test into a footnote via Ctrl Alt F but am still getting the message - I encounter this problem a lot in documents - is it a Word problem with footnotes - my last document had 100 of them.
    Regards
    Shelley
    Last edited by Lady-Laughsalot; 2015-09-16 at 08:05.

  4. #4
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts
    You would normally only sees a message like that if:
    1. one or more footnotes contain fields;
    2. the insertion point is in a footnote; AND
    3. you use Ctrl-A, F9 to update the fields.
    In such cases, the Ctrl-A selects only the footnote range - not the body of the document - and the warning gets generated.
    Cheers,

    Paul Edstein
    [MS MVP - Word]

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •