I have the same issue, if i take the oDoc.ImportFromUrl str, param out of my code the error goes away.
What did Persits say to cure it?