Hi,
I have the macro that use vba to select the whole text of the current
document consider of a lot of pages and do cut and paste to a new document
as separate pages. But the problem is if my current document is a blank
document, how do i check that it is a blank and the macro will not select
and do cut and paste as i have encountered run time error when the current
document is blank.
please advise. thanks.
regards,
ben
Chuck - 05 Apr 2005 18:03 GMT
A blank document has a length of 1 (the paragraph mark). So test if the
length of the document = 1:
If Len(ActiveDocument.Range) = 1 Then
'document is blank
'do nothing
Else
'work your magic
End If
> Hi,
>
[quoted text clipped - 8 lines]
> regards,
> ben