PDA

Click to See Complete Forum and Search --> : Method ~ of Object ~ Failed. Can anyone help?


nevh2001
Apr 25th, 2006, 04:14 AM
Hello all,

I have written an application in VB6 that opens a word document (a template) and performs "find and replace" on data that i pass in. My application is used by external users who log on to our network via Citrix. A few of the users get the error message "Method ~ of Object ~ Failed" (error number -2147023113). The bit of code that this occurs is below:

Do While wrdDoc.Content.Find.Execute( _
FindText:="@" & strReplaceField & "@", _
MatchCase:=False, _
MatchWholeWord:=True, _
ReplaceWith:=strReplacement, _
Replace:=True)
Loop

As fas as i know, its nothing to do with Printer settings or anything, it just seems to be the Execute statement above. Anybody any ideas as to how i can prevent this?

Much appreciated
Nev

salvelinus
Apr 25th, 2006, 07:37 AM
I don't know much about programming Word, or Citix for that matter (have used it, but very briefly), but as a general rule, if the app works on some machine but not others, check if those users have the necessary references and/or .dlls installed on their machines. First thing I'd check, anyway.