1. Forum
    1. Unresolved Threads
  2. Gallery
    1. Albums
    2. Map
  3. Members
    1. Users Online
    2. Team
    3. Search Members
  4. Dollar
  5. Protest Watch
  • Login
  • Register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Forum
  • Gallery
  • Pages
  • More Options
  1. Gaming and Technology
  2. All about tech

Word Bugs that dragged on for years

  • serafina
  • June 15, 2024 at 5:05 PM

There are 5 replies in this Thread which has previously been viewed 704 times. The latest Post (June 18, 2024 at 2:34 PM) was by serafina.

  • serafina
    Moderator
    Likes
    1,203
    Posts
    5,979
    • June 15, 2024 at 5:05 PM
    • #1

    Right now, I have spent a whole afternoon trying to unsuccessfully fix a Word bug. I am using Word 365 for Mac.

    I need to add a certain verbiage at the end of my official translationw, naming the date and the number of pages of the document. While the date field gets updated every time I open the file, the NUMPAGES field does not (nor does DOCPROPERTY PAGES)

    I have tried to add a macro to force to update all fields upon open, however it only updates the page count to 3. I am not sure why, and I find it absurd to spend hours trying to fix something so basic.

    Whenever I print the file, the fields get updated as I have checked the corresponding option in the settings.

    Code
    Sub AutoOpen()
    '
    ' AutoOpen Macro
    ' Macro that update document fields on Open
    
    Dim aStory As Range   Dim aField As Field
       For Each aStory In ActiveDocument.StoryRanges
          For Each aField In aStory.Fields         aField.Update      Next aField
       Next aStory
    
    End Sub
    Display More

    An alternative code I tried and that is not working, either is:

    Code
    Sub UpdateFields()
    
    ' AutoOpen Macro
    ' Macro that update document fields on Open ì
    
    Application.ScreenUpdating = False
    ActiveDocument.PrintPreview
    ActiveDocument.ClosePrintPreview
    Application.ScreenUpdating = True
    
    
    End Sub
    Display More
  • UK Man
    Likes
    2,565
    Posts
    11,555
    • June 17, 2024 at 10:47 AM
    • #2

    It's all Dutch to me I'm afraid.

  • aficionado
    Likes
    382
    Posts
    854
    • June 17, 2024 at 1:50 PM
    • #3
    Quote from serafina

    Right now, I have spent a whole afternoon trying to unsuccessfully fix a Word bug. I am using Word 365 for Mac.

    That is interesting problem I would like to investigate, but not currently able to spend that time. I have only dabbled in Microsoft VBA macros long ago. A good option could be to use an AI like Google Gemini or the others. Microsoft copilot. That is Free for students?

  • SpaceNut
    Likes
    444
    Posts
    1,841
    • June 17, 2024 at 8:31 PM
    • #4

    I tend to dabble in Excel VBA, so can't be of much help with this

    But have you tried https://stackoverflow.com/ to give you the answers you need? Not a guarantee they will answer

  • Bombonera
    Guest
    • June 17, 2024 at 8:35 PM
    • #5

    Should …update document be updates document?

  • serafina
    Moderator
    Likes
    1,203
    Posts
    5,979
    • June 18, 2024 at 2:34 PM
    • #6
    Quote from Bombonera

    Should …update document be updates document?

    Yes, if you press ctrl+F9 the fields update. My point was automating this, since I don't want to have to remember to do it manually, otherwise I can simply write the number of pages myself.

    I have created a macro-enabled template so that the new Word file has already the wording I need, and then I just type in the translation. However, if the translation runs longer than one page, the wording keeps reading "consisting of 1 page" instead of the actual number of pages.

    If I print it, it is updated in the printed version. However, if I deliver the word file, the recipient still sees "consisting of 1 page" if I don't remember to update the fields.

    An annoying bug, if you ask me!

Thank you for the support!

Beer to be spent?

Donate now via Paypal*

*Forwarding to PayPal.Me

Donation Goal

10% reached

Hosting by Prostack UK.

  1. Privacy Policy
  2. Legal Notice
  3. Contact
Powered by WoltLab Suite™ 6.1.12
Argentina Expats Forum in the WSC-Connect App on Google Play
Argentina Expats Forum in the WSC-Connect App on the App Store
Download