Results 1 to 4 of 4
  1. #1
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Disk is full, message (VBA/Word/2003)

    <P ID="edit" class=small>(Edited by wdwells on 18-Jul-06 21:26. The original code snippet waqs incomplete.)</P> The problematic code snippet follows: <pre> Set oDoc = ActiveDocument
    With oDoc
    Selection.HomeKey wdStory
    Selection.MoveDown wdParagraph, 1, wdExtend
    'delete everything after the filename
    .Range(InStrRev(Selection, ".doc", -1) + 3, Selection.End - 1).Select
    If Selection.End > Selection.start Then
    Selection.Delete
    End If
    Selection.TypeText " on "
    Selection.TypeText Format(Now, "yyyy-mm-dd")
    Selection.TypeText " at "
    Selection.TypeText Format(Now, "hh:mm")
    Selection.TypeText " in "
    Selection.TypeText .Path
    .Save
    End With
    Set oDoc = Nothing
    </pre>


    When the code reaches the .Save command, I get the The disk is full. message. However, after acknowledging the message and entering the VBA Debug mode, if I switch to Word and Save, I can revert to the VBE, and run the code successfully.

    I have attached the complete code module as a .txt file.

    Any guidance will be deeply appreciated.

    T.I.A.
    Regards
    Don

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

    Re: Disk is full, message (VBA/Word/2003)

    Your code runs without error on a test document. I do note that the code can easily go into an infinite loop, for example if the document to be processed already contains "commented text" of the type you're trying to create.

    Note: Styles("Normal") may not work in a non-English version of Word - the style name is language dependent. Styles(wdStyleNormal) should work in all versions.

  3. #3
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Disk is full, message (VBA/Word/2003)

    Thank you Hans

    I have also suffered this "Disk is full" problem in Excel. In that instance the problem disappeared after a reboot. No such luck in the case of Word.

    I'm about to re-install Office.
    Regards
    Don

  4. #4
    Silver Lounger
    Join Date
    Jul 2001
    Location
    Ottawa, Ontario, Canada
    Posts
    1,609
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Disk is full, message (VBA/Word/2003)

    Hans
    Further to my post <post#=587,476>post 587,476</post#>, before re-installing Office I copied my problematic file--I realized that I was basing all comments on the interaction with a single file--into a new document and saved it as the original.

    End of problem. I should not have bothered you initially with this as the cure was a lesson learned long ago. Thanks for your patience.
    Regards
    Don

Posting Permissions

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