Results 1 to 11 of 11
  1. #1
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FYI - timing error (XP)

    This is more informative than anything - I don't need a solution, I think..

    I've begun to notice unrelated error messages when saving a copy of my document. I think it's related to my having a FileSave macro operating in a global template.

    Scenario: I'm typing away (two-finggers, but fast) and decide to do a File-Save. I don't miss a beat - Alt-F and then S, and then I think, let's do a spell-check while we are at it - Alt-T and Enter. Happens in the blink of an eye.

    I see a pop-up error message that says, as an example, something about RTF format (It's not an RTF file), or some other vaguely-related to saving-a-document error message, but quite obvioulsy meaningless in my current situation. While I'm staring at this pop-up message, I see the ghost of spellcheck-to-come pop up ITS dialogue box.

    It seems to me that I've typed two commands (save, and spell check) quickly enough that my macro code in FileSave is getting confused with access to the document while Spell-check gets its hand on it.

    These weird messages semm to have arisen only since I implemented a File Save in a global template.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: FYI - timing error (XP)

    Does this also occur if you use Ctrl+S to save, F7 to spell check?

  3. #3
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FYI - timing error (XP)

    > Does this also occur if you use Ctrl+S to save, F7 to spell check?

    Yes. I've attached a snapshot. Above the red line is what I see. Below the red line I have dragged the boxes apart to make the contents visible to me and to you.

    Interestingly, the '4605' error is visible in the VBE, which I have open this morning; the spell-check is visible in Word.

    My post was meant to be informative, in the hopes of trapping other users who see weird messages on a File-save, nonetheless, in your Copious Free Time (tm) you are welcome to try to trigger it.

    Right now I have opened a 217-page document, text, no graphics. 1MB. If you want to try duplicating the problem I'd suggest,
    (a)open a large document and make a minor change
    (b)open a template, enter VBE, and make a minor change
    alt-tab back to Word
    (d) issue the Ctrl-S, F7 combination, and see if it triggers the behaviour.

    I think I've seen at least three different messages over the past couple of weeks.

    FWIW I'll try to hang on to them as they arise, to build a compendium (can I say that?) of error-message numbers.
    Attached Images Attached Images

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: FYI - timing error (XP)

    That does look like a timing problem. Just for the fun of it, you could turn off "Allow background saves" in the Save tab of Tools | Options... to see if that makes a difference.

  5. #5
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FYI - timing error (XP)

    Not turned on! (attached)
    Attached Images Attached Images

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: FYI - timing error (XP)

    Out of ideas then. Does your Filesave macro do a lot of work?

  7. #7
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FYI - timing error (XP)

    > Out of ideas then. Does your Filesave macro do a lot of work?

    Don't sweat the ideas, this was meant to be an informative post anyways.

    Here's the FileSave. It's part of a "better MRU" idea, that delivers me more than 9 MRU's, and (optionally) mixes -platforms (Word, Excel etc.). I'm prepared to send you the code for private examination, if you want. It's working in its basic form.

    "Initialize" a la Geoff Whitfield merely sets up a class variable with the macrocontainer.path and an application string identifier.
    Then I "ActiveDocument.Save" which is where, I think, the timing problem arises.
    "MRUse.UpdateMRU" appends an item to the registry (VB/VBA keys)
    "intAddDropdown" appends the new item to the ever-growing drop-down list on a toolbar.

    <pre>Public Sub FileSave()
    '''
    Call Initialize(strcApplication)
    ''' This can be invoked from any routine which hi-jacks the File, save menu.
    ''' Check that we saved a novel document
    Dim strFullName As String
    strFullName = ActiveDocument.FullName
    ActiveDocument.Save
    If strFullName = ActiveDocument.FullName Then ' we did not
    ''' 2005/01/22 try updating anyway, for those file sopened through Explorer and re-saved
    Call MRUse.UpdateMRU(ActiveDocument.FullName)
    Else ' we did!
    ''' We should update AT LEAST the storage file
    Call MRUse.UpdateMRU(ActiveDocument.FullName)
    End If
    Call intAddDropdown(strcMRUToolbar, strcMRUListBox, strFullName)
    End Sub</pre>


  8. #8
    5 Star Lounger st3333ve's Avatar
    Join Date
    May 2003
    Location
    Los Angeles, California, USA
    Posts
    705
    Thanks
    0
    Thanked 2 Times in 2 Posts

    Re: FYI - timing error (XP)

    Pssst: I believe Hans' first post was what you might call a good-natured Dutch tweak.

    Not that it's any of our business, but what higher-priority use have you assigned Ctrl-S to?

  9. #9
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FYI - timing error (XP)

    > Pssst: I believe Hans' first post was what you might call a good-natured Dutch tweak

    Oh. Well, then, his delivery was lousy or his timing was off (grin!).

    I see. I should be using Ctrl-S & F7 to shave a few more microseconds off my time .....

    OK. I started using menu-by-the-keyboard years ago to demonstrate exploration of applications. I've worn my tracks into a personalised mixture of Ctrl-sequences and regular Alt-sequences.

    I haven't assigned Ctrl-S to anything special. Perhaps that's why I took Hans seriously. I know that in the past I've seen slightly different behaviour between toolbars and menu (as in the recording of clicks vs. keyboards), and I believe that I've seen differences between File-Save in VBE and File-save in Word, operating on the same template.

    For that reason Hans's intimation that Ctrl-S might effect different behaviour made complete sense. To me.

  10. #10
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: FYI - timing error (XP)

    Might it be that you are hitting the spellcheck keys so quickly after the save ones that you're actually getting your spellcheck running before the second part of the save macro can execute - thereby having a "proofing window" open when it tries to execute the second save? At least, that's what the error sounds like to me ...?
    Beryl M


  11. #11
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FYI - timing error (XP)

    > getting your spellcheck running before the second part of the save

    Oh absolutely. There are two things happening at once, here "Save" and "Spellcheck" Synchronously, too, I'll be bound

    The puzzlement, that might well confuse others, is the variety of messages that pop up. I provided but one example.

    If I got a single, straight message from Word, such as "'Error '9999' - you're actually getting your spellcheck running before the second part of the save macro can execute", it'd make sense. I quickly tumbled onto the conjunction of my FileSave macro and the Spell-checking device.

    Obviously, a program such as MSWord that is going to support background saves (mine was turned off), will have checks in to make sure that one device (spellcheck) isn't trying to change the document while another device (FileSave) is writing it to disk as an entire unit. It's more than text when a word is spell-checked, right? Pointers and patches all over the place. Imagine if these two devices WERE to be allowed to proceed together - pretty soon you'd have what we in the trade call a corrupted document. (grin)

    Given that Word ought to be dealing with this eventuality (and others), I'm puzzled that there are conflicting and potentially misleading error message. Still, that's Word, I suppose.

Posting Permissions

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