Help ! Notes error: Access to data denied

Hi All:

I am trying to extract an attachment from document into the hard drive. I am getting the following error:

“Error : 4005 : Notes error: Access to data denied. (E:\Temp1)”

Here is the relevant code:

Set item = attachdoc.GetFirstItem(“$FILE” )

Forall v In item.Values

Messagebox( v )

Set object = attachdoc.GetAttachment(v)

Call object.ExtractFile(“E:\Temp1”)

End Forall

the code(in a script library) is running in the background and is called from a background agent.

What could be wrong with the code???

Thanks

Subject: Help !!! Notes error: Access to data denied.

me too!Please, any suggestion ?

Subject: Help !!! Notes error: Access to data denied.

Forgive me for responding to a year-old post, but I ran into this same error and was looking for a solution in the forum, then it struck me that I am brain dead.

The ExtractFile method doesn’t automatically use the embedded object’s filename; you have to specify one for it. So in this case instead of:

Call object.ExtractFile(“E:\Temp1”)

… you have to use something like:

Call object.ExtractFile("E:\Temp1" + filename)

Hope this helps anyone else who runs across this error.

Subject: RE: Help !!! Notes error: Access to data denied.

I use Call object.ExtractFile("E:\Temp1" + filename) - and still get the same error.

Subject: RE: Help !!! Notes error: Access to data denied.

Ed,

If you ever read this, can I simply say, you’re a star!

Like you, I hadn’t read the help properly (I think the reference to the path$ variable is what threw me!)

My extract is now working fine thanks to that post.

Many thanks indeed, and please, never apologise for posting a belated response to something - there are far more people who will benefit than the actual poster of the original question.

Tony