PC Review


Reply
Thread Tools Rate Thread

Recurring message with attachment

 
 
Duane Thomas
Guest
Posts: n/a
 
      3rd Jul 2003
I followed this MS article to create a recurring email:
http://support.microsoft.com/default.aspx?scid=kb;en-
us;239087

It works great, but now I want to also include an
attachment. I tried several things, such as
NewItem.Attachments.Add Source = "path" but get this
error:

"One or more parameter values are not valid" The
reference is to line 11 which is the line for the
attachment.

 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      3rd Jul 2003
You can just put the path there since it's the first argument in the
Add method.

If you want to use named arguments you have to use the correct syntax:
NewItem.Attachments.Add Source := "path"

Named arguments always have to use a colon followed by an equal sign.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


"Duane Thomas" <(E-Mail Removed)> wrote in message
news:056201c34110$bf690980$(E-Mail Removed)...
> I followed this MS article to create a recurring email:
> http://support.microsoft.com/default.aspx?scid=kb;en-
> us;239087
>
> It works great, but now I want to also include an
> attachment. I tried several things, such as
> NewItem.Attachments.Add Source = "path" but get this
> error:
>
> "One or more parameter values are not valid" The
> reference is to line 11 which is the line for the
> attachment.
>



 
Reply With Quote
 
Duane Thomas
Guest
Posts: n/a
 
      3rd Jul 2003

Here is my code. When I run the form, I get an error saying "Could not
complete the operation. One or more parameter values are not valid.
Line No:11"

Sub Item_PropertyChange(ByVal Name)
Select Case Name
Case "Status"
if Item.Status = 2 then '2 = Completed
Set NewItem = Application.CreateItem(0)
NewItem.To = "(E-Mail Removed)"
NewItem.CC = "(E-Mail Removed)"
NewItem.Recipients.ResolveAll
NewItem.Subject = "Team Meeting - Ops. 2 Dept. 3 Team 304"
NewItem.Body = "Attached is the agenda for Team 304's Team Meeting to be
held next Monday."
NewItem.Attachments.Add Source = "C:\Agenda.doc"
NewItem.Display
End IF
End Select
End Sub




*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
Reply With Quote
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      3rd Jul 2003
I just told you, your syntax is not correct.

Either lose the Source = and just put the path there or use the
correct syntax and use
Source := "C:\Agenda.doc" . You need the colon before the equal sign.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Lead Author, Professional Outlook 2000 Programming, Wrox Press
Lead Author, Beginning VB 6 Application Development, Wrox Press
Attachment Options
http://www.slovaktech.com/attachmentoptions.htm
Extended Reminders
http://www.slovaktech.com/extendedreminders.htm


"Duane Thomas" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>
> Here is my code. When I run the form, I get an error saying "Could

not
> complete the operation. One or more parameter values are not valid.
> Line No:11"
>
> Sub Item_PropertyChange(ByVal Name)
> Select Case Name
> Case "Status"
> if Item.Status = 2 then '2 = Completed
> Set NewItem = Application.CreateItem(0)
> NewItem.To = "(E-Mail Removed)"
> NewItem.CC = "(E-Mail Removed)"
> NewItem.Recipients.ResolveAll
> NewItem.Subject = "Team Meeting - Ops. 2 Dept. 3 Team 304"
> NewItem.Body = "Attached is the agenda for Team 304's Team Meeting

to be
> held next Monday."
> NewItem.Attachments.Add Source = "C:\Agenda.doc"
> NewItem.Display
> End IF
> End Select
> End Sub
>
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Recurring monthly appointment with attachment that changes P. Elliott Microsoft Outlook Calendar 1 18th Jul 2009 05:11 AM
Can't delete attachment from one instance of recurring appointment Amit Microsoft Outlook Calendar 3 31st Mar 2008 08:00 PM
Recurring mail attachment(s) Torsten Piehl Microsoft Outlook VBA Programming 3 2nd Jan 2006 09:30 PM
Recurring email with attachment phil Rutter Microsoft Outlook VBA Programming 0 11th Aug 2003 03:24 AM
Re: Recurring email with attachment Woody Microsoft Outlook VBA Programming 0 9th Aug 2003 01:16 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:42 PM.