forget about the macro, there's a proper form filler you can download from this link:
http://kmext.sourceforge.net/files/autofillforms.7z
(extract 7z package right into kmeleon's folder)
for tutorial
http://kmeleonbrowser.org/forum/read.php?9,103922
(scroll to the middle section of the thread)