Disk is full error

M

Mark64

I have a Word document which contains a macro to update the entire document,
which is connected to a toolbar button. The macro is as follows:

Sub UpdateDocument()
'
' Macro1 Macro
' Macro recorded 8/25/2005 by mark
'
Dim pRange As Word.Range
For Each pRange In ActiveDocument.StoryRanges
Do Until pRange Is Nothing
pRange.Fields.Update
Set pRange = pRange.NextStoryRange
Loop
Next
End Sub

When I run this macro it goes through the entire document, including the
headers and footers, and updates all of the fields. In this document all of
the headers are the same and I have a single fill-in field in the header in
the first section (it contains several sections, but the headers are all set
as "Same as Previous"). Therefore it asks me what I want to fill-in the
field with. Every once in awhile it will ask me twice, which I think is odd
because there is only one of these fields in the header. Then after I do
this I try to save and it gives me an error that the disk is full (which it
definitely is not). The error message is as follows:

The disk is full. Free some space on this drive, or save the document on
another disk. Try one or more of the following:
*Close any unneeded documents, programs, and windows.
*Save the document on another disk.

I have tried these solutions and it still doesn't save. Can anyone help me
with this?

Thank you in advance,

Mark64
 
J

Jezebel

The macro and the message are not necessarily related. There's nothing wrong
with that macro. Word uses the 'disk is full' message for a variety of error
conditions, most of which have nothing to do with the fullness or otherwise
of your disk. It seems to be a general-purpose "there's a problem with this
document" message.

First, just be certain: you're not trying to work with the document
directly on a removable drive (CD or floppy)? - if you are, then that's the
problem.

Second, putting a fill-in field in the header is poor practice. Rather than
spending time trying to diagnose this current problem, I think you'll find
that if you remove the fill-in field and deal with the repeated information
in some other way (eg through document properties and a DocProperty field in
the header), the problem will go away.
 
M

Mark64

I went into the document and removed the fill-in field, however I am still
getting this error when I run the macro. So I tried to update the entire
document manually. In the body I pressed "Ctrl A" to select all and then I
hit F9 to update. Then I selected the header and repeated this process and
then the same for the footers. Effectively doing exactly what the macro
should be doing. However when I went to save, I did not get the error, the
file was saved (to the hard drive).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top