G
Gavin0268
Hi
I have a macro attached to a template which creates a table in the header.
Recently, for some documents, but not all (and I can't see any pattern) I
occassionally get a 'Run-time errot 5941 - the requested member of the
collection does not exist'. It is stopping at the line indicated
If Left$(Currentfilename$, 1) = "~" Then
Select Case DocNew$
Case "FALSE"
Set rng = ActiveDocument.Range
rng.Font.Hidden = False
Set rng = ActiveDocument.Paragraphs(1).Range
rng.End = ActiveDocument.Paragraphs(2).Range.End (debug stops here)
rng.Font.Hidden = True
End Select
The macro was originally written for Word97. I think (but am not completely
certain) that the errors have started since we migrated to Office 2003.
If I press 'end' rather than 'debug', the header table is there, but without
borders.
Any suggestions welcome!
Thanks
I have a macro attached to a template which creates a table in the header.
Recently, for some documents, but not all (and I can't see any pattern) I
occassionally get a 'Run-time errot 5941 - the requested member of the
collection does not exist'. It is stopping at the line indicated
If Left$(Currentfilename$, 1) = "~" Then
Select Case DocNew$
Case "FALSE"
Set rng = ActiveDocument.Range
rng.Font.Hidden = False
Set rng = ActiveDocument.Paragraphs(1).Range
rng.End = ActiveDocument.Paragraphs(2).Range.End (debug stops here)
rng.Font.Hidden = True
End Select
The macro was originally written for Word97. I think (but am not completely
certain) that the errors have started since we migrated to Office 2003.
If I press 'end' rather than 'debug', the header table is there, but without
borders.
Any suggestions welcome!
Thanks