>>>>
>>>>
>>>>* get a reference to the bookmark
>>>>
>>>>loBookmark = THIS.GetBookmark(lcBookmarkName,toDocument)
>>>>
>>
>>
>
>But there you don't seem to have null check. Maybe because it is a pseudocode. You might get some info, google searching that exact message. I have similar code and I haven't heard an error yet.
ISTR I had such cases with Excel and/or Word (well more than ten years ago) where I'd create dozens of documents by merging templates, and it would work for hundreds of cases, but sometimes, out of the blue, it would claim that something doesn't exist - the .shapes() collection, or a certain method. Checking for nulls was completely out of my mind, because we did simple dbfs back then and didn't allow for nulls. And don't really remember whether left joins were involved, but if that was the cause, we'd have hundreds, because it was mostly same data every day.
IOW, even Office 2003 had this problem from time to time.