navision word automation - call to member item failed

can any body show me how i can use coding for “ms office-word automation” in navision.

i have allready used following coding, but it is showing error.

Name DataType Subtype Length
wrdApp Automation ‘Microsoft Word 11.0 Object Library’.Application
wrdDoc Automation ‘Microsoft Word 11.0 Object Library’.Document
wrdRange Automation ‘Microsoft Word 11.0 Object Library’.Range

Companyinfo.FIND;
userinfo.GET(USERID);

CREATE(wrdApp);
TemplateName:=‘c:\template.doc’;
wrdDoc:=wrdApp.Documents.Add(TemplateName);
wrdApp.ActiveDocument.Fields.Update;

wrdRange:=wrdApp.ActiveDocument.Fields.Item(1).Result;
wrdRange.Text:=USERID;
wrdRange.Bold:=1;

wrdApp.Visible:=TRUE;
wrdApp.ActiveDocument.Fields.Unlink;

when i used above coding i found following error:

“The call to member item failed.the requested member of the collection does not exist.”

and the debugger stops at the line which is underline.Pls give me any solution.thanks.

regards

vijay tiwari.

Locked as a duplicate post of

http://dynamicsuser.net/forums/p/26519/143093.aspx#143093