Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem using VB to save email attachment 1

Status
Not open for further replies.

taupirho

Programmer
Jun 25, 2002
680
GB
I'm trying to detach an attached file from a notes email using VB. I've pretty much got it coded but for some reason the embeddedobject of the doc is returning empty even though the hasembedded property is true and there is clearly an attached file to the email. Why would this happen and is there a fix. I'm using Lotus Notes V5 and VB6.
 
And what was the issue ? It would be interesting to know.

Pascal.
 
I'm not comletely sure but I think it was something to do with the fact that the attachment was not contained within a richtextitem. Any way I just used a different way (using getattachment) to get the same result.
 
tomreid,

I am trying to do the same thing. I had it working at one time then the project got shelved and I cannot find the code I was using that worked. Can you point me in the right direction?

Bill
 
Set db = s.GetDatabase("your_server_name", "your_nsf_filename")

What if the machine is not connected to the server? The file is on the local computer. What goes in the server name? I tried using the actual server name and the workstation attempts to dial into the server. I used "Local" and it errors out.

Bill Rockwell
 
Bill,
with your inbox open click on File->Database->Properties

Look at what it says next to server. I thinks that's what you need.
 
The properties window just indicates that the server is Local. I tried using "Local" but that did not work. I tried " " and that appears to work but VB does not like the line

Set object = doc.GetAttachment(Z) object.ExtractFile (FileName)

I get a syntax error

Bill
 
Bill, what error message do you get. What's in doc, Z and FileName when you get the message. It's possible that VB accepts the "" but it doesn't do anything sensible with it.
You need to do a bit of debugging to ensure that the variables mentioned above as well as db, v, vn, e etc... have sensible values in them as the program is running.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top