Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Question Recent Documents Not Populating

    I have a problem where the Recent Documents list in Word won't populate and I can't open files. It occurs when there is a vba macro running a loop in the background. The loop is to generate change events for Content Controls.

    There are DoEvents calls in the code so Word should be able to function normally.

    Any suggestions?

    Thanks
    Gordon

  2. #2
    Silver Lounger
    Join Date
    Mar 2014
    Location
    Forever West
    Posts
    2,078
    Thanks
    0
    Thanked 259 Times in 248 Posts
    Which version of Word? There is a setting in Word 10, Options, Advanced, Display for setting the number of Recent Documents. Could your macro be messing with that when it is running?

  3. #3
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Berton View Post
    Which version of Word? There is a setting in Word 10, Options, Advanced, Display for setting the number of Recent Documents. Could your macro be messing with that when it is running?
    It's in 2013. THe code isn't touching the recent documents. Everything is fine with other files, the list displays correctly as long as the file with the event loop is not open. It also works if I stop the event loop. I'm working on code to stop the loop and restart it when the user tries goes to open a file. I can get it to stop reliably, but not to restart in all cases.

    Thanks
    Gordon

  4. #4
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,853
    Thanks
    4
    Thanked 259 Times in 239 Posts
    What is the code you have running? It sounds like that is where your problem is coming from.

    If you can't open files then I am not surprised that the recent documents is not being changed.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  5. #5
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by Andrew Lockton View Post
    What is the code you have running? It sounds like that is where your problem is coming from.

    If you can't open files then I am not surprised that the recent documents is not being changed.
    It's not that the list is not being changed, it is that it is empty.

    The code is a loop that watchs the current Content Control for changes so I can generate an On_Change type event for them. I realise it's what is causing the issue, what I don't know is how to set it up so it won't cause these sort of problems for the end user. It appears that if I stop the loop when the document loses focus and restart it when it receives focus again everything works.

    Thanks
    Gordon

  6. #6
    5 Star Lounger
    Join Date
    Mar 2001
    Location
    New York, NY
    Posts
    922
    Thanks
    2
    Thanked 12 Times in 11 Posts
    What's the reason for the loop? Why not use the CC BeforeUpdate or OnExit event?

  7. #7
    2 Star Lounger
    Join Date
    Aug 2014
    Posts
    111
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Quote Originally Posted by richardbarrett View Post
    What's the reason for the loop? Why not use the CC BeforeUpdate or OnExit event?
    Because they are not Change events. I need something that fires as soon as the user enters any text or selects an item in a listbox, not after exiting the field. The forms have sections that are shown or hidden depending on the answer selected in some listboxs. If I use the enter and exit events, they have to move out of the field before the sections get shown or hidden. That makes it a bit painful to try various options and see what they do.

    I would prefer to be using ActiveX controls as I have for years, but Word 2013 breaks them in many ways, so I have to use Content Controls. The lack of a Change event is only one of many things Content Controls are missing in comparison to the ActiveX type.

    One of the biggest being that you can't tab into a listbox content control and start entering text so it selects the matching entry. This makes using the forms painful to say the least when there are a lot of fields. The least I can do is to make it as responsive as possible.

    Regards
    Gordon
    Last edited by dogknees; 2014-10-22 at 04:27.

Posting Permissions

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