PDA

View Full Version : A vague question about crashing documents



OTWarrior
01-24-2008, 05:38 AM
Happy New Year everyone :)

Anyway, I have finished off a project concerning a word document using macros.

The document uses formfields which are protected, and one request was for a spell checker, so I implemented one.

Now, I am unsure of why, but a few of the people coming back to me have said that it:
1) crashes word
2) freezes the screen (only word)
3) doesn't save correctly.

I know I am asking alot, especially as I am not able to upload the document, but what would be the most likely causes of these issues?

I have asked them already for what version of word they are using, etc, and it all seems to be the same "Word 2002 (x) sp3" aside form the x number. Since this number relates to the version, would this make a big difference if it were to be different?

Most people do not have any issues, and there are only a few, but I am getting a bit of stick for it.

I have tried removing the spell checker code, which seems to help, but am in the process of checking other ideas.

Anything you can contribute would be greatly appreciated :)

TonyJollans
01-27-2008, 05:38 AM
Certainly a vague question :)

I am not aware of any particular issues. Assuming (big assumption perhaps) that your spell checking is at the root of the problem, how have you implemented it? Even if you can't post a document, can you post the code?

OTWarrior
01-30-2008, 05:22 AM
Public Sub Proofing()
With Selection
If .FormFields.Count = 1 Then
BKMName0 = .FormFields(1).Name
ResultCheck0 = ActiveDocument.FormFields(BKMName0).Result
ElseIf .FormFields.Count = 0 And .Bookmarks.Count > 0 Then
BKMName0 = .Bookmarks(.Bookmarks.Count).Name
ResultCheck0 = ActiveDocument.FormFields(BKMName0).Result
End If
End With
End Sub
'
Public Sub SpellChqer()
With ActiveDocument.FormFields(BKMName0)
If .Result = "" Then
Else
If ActiveDocument.ProtectionType <> wdNoProtection Then
ActiveDocument.Unprotect Password:=""
End If
.Range.NoProofing = False
.Range.CheckSpelling
.Select
If ActiveDocument.ProtectionType = wdNoProtection Then
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True, Password:=""
End If
End If
End With
End Sub

"proofing" on entry, "SpellChqer" on exit. What is funny is the people computers seem to freeze even when they are not in a field which uses the code.

TonyJollans
01-30-2008, 02:36 PM
Nothing there that I would expect to cause the problems. If it happens elsewhere in the Form it probably has another cause.

If Word crashes, I would suspect corruption of the Word installation or the Normal template or maybe the Form template (but less likely if most people are unaffected). Or possible the printer driver.

If it freezes (assuming there's no code running) I would again suspect corruption.

I'm not sure what doesn't save correctly means.


Make sure they have the latest printer driver for their default printer (at least).
Try detect and repair the Word installations (off the Help menu).
Try renaming Normal.dot to Normal.old so Word creates a new one.

OTWarrior
01-31-2008, 05:47 AM
Thank you for that, the detect and repair could prove useful, and hopeful fix some of their computer issues.

If it is their normal.dot, then I will have some headaches explaining how to rename it to them, but again, is another thing for me to try.

The whole "doesn't save" issue is a funny one, as none of them have yet to tell me exactly what they mean, though I am guessing they mean when they save it in a folder the fields they have filled don't get saved. Again, I am guessing.

Thank you for the suggestions, I didn't even think of some of them, and I will give them a whirl.

PS: I like your new avatar pic :)