Corrupt Form?

  • Thread starter Montana DOJ Help Desk
  • Start date
M

Montana DOJ Help Desk

Word 2000

In the last 2 days I have started getting the following error message when I
try to save my project:

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.

The problem is NOT with disk space (I currently have over 1 GB of free drive
space). The problem is not with the hard drive itself (I ran ScanDisk and
defragged). If I try saving to another drive, I get the same message.

I noticed that if I remove a certain form from the project, the problem goes
away. If I import that form again, then problem comes back. I can do this
over and over, and the results are always repeatable--remove the form and
the problem goes away, bring back the form and the problem comes back.

So it looks like a problem with a corrupt form. I have a couple of
questions:

1) Could it be something other than a corrupt form?

Assuming that it is a corrupt form...

2) Is there a way to repair the form without rebuilding it from scratch,
like by running a code cleaner on it?

3) Are there any practices that I should be following to make sure my forms
don't become corrupt?

Any other information that anyone can offer will be greatly appreciated.

BTW: I'm currently in the process of moving everything into a new template
in case this is an issue with a corrupt project, but this one form seems to
be the stumbling block. It wouldn't be a big issue to rebuild the form
completely, but I'd like to get answers to my questions anyway, if possible,
just for my own knowledge if for no other reason.

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 
J

Jonathan West

Montana DOJ Help Desk said:
Word 2000

In the last 2 days I have started getting the following error message when
I
try to save my project:

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.

The problem is NOT with disk space (I currently have over 1 GB of free
drive
space). The problem is not with the hard drive itself (I ran ScanDisk and
defragged). If I try saving to another drive, I get the same message.

I noticed that if I remove a certain form from the project, the problem
goes
away. If I import that form again, then problem comes back. I can do
this
over and over, and the results are always repeatable--remove the form and
the problem goes away, bring back the form and the problem comes back.

So it looks like a problem with a corrupt form. I have a couple of
questions:

1) Could it be something other than a corrupt form?

Assuming that it is a corrupt form...

2) Is there a way to repair the form without rebuilding it from scratch,
like by running a code cleaner on it?

Try the Word VBA Code Cleaner, available from
http://word.mvps.org/FAQs/MacrosVBA/TemplateBloat.htm
3) Are there any practices that I should be following to make sure my
forms
don't become corrupt?

Run the code cleaner periodically if you have a template with a large prject
that is getting built or updated.
 
H

Helmut Weber

Hi,
did you try to rename the form or to do any minor change to it?
Or a major change, if a minor doesn't work?
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 
M

Montana DOJ Help Desk

I tried running the code cleaner when I got home last night (don't have it
installed on my work machine, so couldn't try it before I posted the
message). I immediately got an "ambiguous name" error on a variable in the
ThisDocument module, but the variable that got highlighted has a unique
name. I know this because I had a problem with an ambiguous name (that
really was ambiguous) once before, so I developed a naming convention to
insure that all variables, objects, controls, etc. have unique names.

My *theory* at this point is that the ambiguous name error is just a symptom
of the problem with the form. I have a plan to test this theory. After
reading Helmut's reply, I was able to identify the exact item (a label) on
the form that seems to be causing the problem (read my reply to his
message). I'll remove that label from the form, then run the code cleaner.
If I don't get the ambiguous name error, then I'll now the label in the form
was the problem. If I still get the error, then I'll move the form into a
new project by itself, and run the code cleaner again to see what happens.

I'll post my results for anyone who may be interested.

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 
M

Montana DOJ Help Desk

Helmut,

Thanks for the reply. I had not tried what you suggest, but after reading
your reply, I opened the form and started removing things one-by-one. After
removing each item, I tried to save the project to see if I would still get
the error. Obviously, if you get the error, then your remove something from
the form, and suddenly you don't get the error, then it's a pretty good bet
that the thing you just removed is the thing that was causing the error. I
found a label that seems to be the cause of the problem. If I remove just
that one label and leave everything else intact, I can save the project
without any problems.

So this brings up another question. What is the best way to proceed at this
point? Can I simply recreate that label in the form and end up with a
clean, stable form? Or does the problem with the label indicate a more
serious problem with the form in general (in which case rebuilding the form
from scratch would be the safer option)?

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 
H

Helmut Weber

Hi,
IMHO, it is a matter of luck. I'd try to recreate
the label and give it another name. Or, I'd try
not to use a label at all, but a textbox, whose
appearance can be tweaked to look like a label.
If you rebuild the whole form, you may arrive at
the very same problem again. Maybe as well,
but unlikeley, the label was the last control
created, and it is just one control too much.
 
M

Montana DOJ Help Desk

Well, I ran my little test, but before I give the results, let me clear up a
mis-statement I made in my last post. I had previously stated that I was
getting the "ambiguous name" error when I tried to run the code cleaner.
When I got home and tried my test, I realized that my previous statement was
in error. In fact, I was getting the "ambiguous name" error when I first
opened the VBE. When I tried to run the code cleaner, I got a different
error. I don't recall the precise error message, but it was along the lines
of "Application or user-defined object not defined."

Now that I've corrected myself on that point, here's what my test found. I
first tried to run the code cleaner on the project as-is, and I got the
expected error. I then removed the problem label from my form, and ran the
code cleaner again. After the change, the code cleaner ran without errors.
I also found that I was no longer getting the "ambiguous name" error when I
opened the VBE. So it would appear that both errors where associated with
the corrupt label on the form.

-- Tom

State of Montana
Department of Justice Help Desk

"Making the world a safer place."
 

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