473,395 Members | 1,574 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Create/mail/delete - files

Can anyone help me??

Im having trouble to delete and then create files, that i've emailed??.

1)
Im sending a file using cdo.message class

Dim CDOMsg = New CDO.Message

With CDOMsg
.To = "me@my.com"
.From = "me@my.com"
.Subject = "FileTest"
.HTMLBody = "<html>See attached file.</html>"
.AddAttachment("C:\test.txt")
.Send()
End With

2)
Deleting the file
If File.Exists(C:\test.txt) Then
File.Delete(C:\test.txt)
End If

3)
Then i tried to create a new file, with the same name. But i get a
permission denied??
I have found out that it's probely is the cdo.message, who still got a
refferance to the file, but how do i remove this refferance to the cdo??

Thanks
Nov 21 '05 #1
2 1278
CDOMsg = nothing
"Henrik" <He****@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
Can anyone help me??

Im having trouble to delete and then create files, that i've emailed??.

1)
Im sending a file using cdo.message class

Dim CDOMsg = New CDO.Message

With CDOMsg
.To = "me@my.com"
.From = "me@my.com"
.Subject = "FileTest"
.HTMLBody = "<html>See attached file.</html>"
.AddAttachment("C:\test.txt")
.Send()
End With

2)
Deleting the file
If File.Exists(C:\test.txt) Then
File.Delete(C:\test.txt)
End If

3)
Then i tried to create a new file, with the same name. But i get a
permission denied??
I have found out that it's probely is the cdo.message, who still got a
refferance to the file, but how do i remove this refferance to the cdo??

Thanks

Nov 21 '05 #2
Hi Rick,,

Sorry,, but of couse im setting my cdomsg to nothing, but it still does't
work?

Do you know if i can attach a stream insted?? then i can flush it instead..

"Rick Mogstad" wrote:
CDOMsg = nothing
"Henrik" <He****@discussions.microsoft.com> wrote in message
news:64**********************************@microsof t.com...
Can anyone help me??

Im having trouble to delete and then create files, that i've emailed??.

1)
Im sending a file using cdo.message class

Dim CDOMsg = New CDO.Message

With CDOMsg
.To = "me@my.com"
.From = "me@my.com"
.Subject = "FileTest"
.HTMLBody = "<html>See attached file.</html>"
.AddAttachment("C:\test.txt")
.Send()
End With

2)
Deleting the file
If File.Exists(C:\test.txt) Then
File.Delete(C:\test.txt)
End If

3)
Then i tried to create a new file, with the same name. But i get a
permission denied??
I have found out that it's probely is the cdo.message, who still got a
refferance to the file, but how do i remove this refferance to the cdo??

Thanks


Nov 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Frank Millman | last post by:
Hi all I need to generate potentially large reports from a database, and I want to offer the option of print preview before actually printing (using wxPython). I figure that the best way to...
2
by: Mikey | last post by:
Sample VB .NET source code to create mailing labels or customized letters using MS Word MailMerge This VB .NET source code will start MS Word and call methods and set properties in MS Word to...
5
by: Michael Sperlle | last post by:
Is it possible? Bestcrypt can supposedly be set up on linux, but it seems to need changes to the kernel before it can be installed, and I have no intention of going through whatever hell that would...
2
by: Brad | last post by:
I have a web .Net app which sends emails with attachments. After the email is sent I clean up aftermyself and delete the attachments from disk. In upgrading to .Net 2 I changed the email logic...
23
by: sandy | last post by:
I need (okay, I want) to make a dynamic array of my class 'Directory', within my class Directory (Can you already smell disaster?) Each Directory can have subdirectories so I thought to put these...
1
by: =?Utf-8?B?aGZkZXY=?= | last post by:
Hello, I have a web application that makes use of the SQL Membership and Role providers. My app has admin screens to manage users (membership), roles, and supplementary user data. I have just...
1
by: Fischi | last post by:
Hi, I am getting the error message Script line: 84 Can't create table '.\dwh\f_umsatz.frm' (errno: 150) during execution of the following script on a windows system and mysql 5.0: ...
1
by: Claire | last post by:
Ive written a small string resource building utility that I send out to our translators. I have a setup project for each language we support, which picks out a group of 12 english resx files plus...
0
by: dbsog7777 | last post by:
I was trying to use the sample code below, but I encountered two errors: Application.DoEvents() and AutoText(entry). I am not sure how to correct the errors. I trying to use the sample code to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.