Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Trouble emailing a file in VBScript

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,877
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Trouble emailing a file in VBScript
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Trouble emailing a file in VBScript - 7/13/2003 11:24:07 PM   
  rob82

 

Posts: 1
Score: 0
Joined: 7/13/2003
From:
Status: offline
I am just writing part of a script (.vbs) to regurlary send emails with an attached file.
i'm using windows me, and ive registered cdosys.dll.

here's my code code:

Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "Automated Backup"
objMessage.Sender = "..."
objMessage.To = "..."
objMessage.TextBody = "This is an aoutomated email to backup the attached file."
objMessage.AddAttachment "..."
objMessage.Send
Set objMessage = Nothing


with this i get the following error:
line 7
char1
The parameter is incorrect
code: 80070057
source: CDO.Message.1

if i comment out the attachment line it works.
any help you can give me would be appreciated as i cannot see what is wrong with this, & i've searched everywhere & am very frustrated.

Thanks.
 
 
Post #: 1
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Trouble emailing a file in VBScript Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts