O
omar.norton
Hi,
I'm using a slightly modified form of the code found on
http://support.microsoft.com/kb/210271 to create a letter based on a
template with the name and address of the record you're viewing added
into it.
All I've changed from the code on the above website is the names of
some of the bookmarks/controls and I've got rid of the code for
copying a photograph as I don't need it.
You can see that the code works by copying the text from your control
and pasting it over one of the bookmarks in your word document. If the
control is empty then you would get a runtime error 92 "invalid use of
null" as you are trying to make a character string from a null - but
those thoughtful people at microsoft have put in an error handler at
the bottom for just this error, so that if this happens the empty
control will be replaced with a zero-length string and the code will
move on to the next bookmark.
But my problem is - runtime error 92 occurs anyway when an empty
control is used, as if the error handler doesn't exist!
Does anyone have any ideas?
Thanks in advance
I'm using a slightly modified form of the code found on
http://support.microsoft.com/kb/210271 to create a letter based on a
template with the name and address of the record you're viewing added
into it.
All I've changed from the code on the above website is the names of
some of the bookmarks/controls and I've got rid of the code for
copying a photograph as I don't need it.
You can see that the code works by copying the text from your control
and pasting it over one of the bookmarks in your word document. If the
control is empty then you would get a runtime error 92 "invalid use of
null" as you are trying to make a character string from a null - but
those thoughtful people at microsoft have put in an error handler at
the bottom for just this error, so that if this happens the empty
control will be replaced with a zero-length string and the code will
move on to the next bookmark.
But my problem is - runtime error 92 occurs anyway when an empty
control is used, as if the error handler doesn't exist!
Does anyone have any ideas?
Thanks in advance