![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Am Sun, 18 Jun 2006 22:07:01 -0700 schrieb Tim:
Tim, what happens if you´re using the Recipients collection for all addresses and call Recipients.ResoveAll? -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- Thanks Michael. After the email is displayed (correctly) the user clicks send and gets the error "This message could not be sent. One or more parameters could not be found" Code as follows: Public Sub SendMailOutlook(aTo, Subject, TextBody, aFrom, cc, strFile, Optional strTemplate = "") Dim Message As Outlook.MailItem On Error GoTo 0 Const olOriginator = 0 'Create new message If strTemplate = "" Then Set Message = Outlook.CreateItemFromTemplate(GC_TEMPLATE_FOLDER & "Template.oft") Else Set Message = Outlook.CreateItemFromTemplate(GC_TEMPLATE_FOLDER & "Rostering Confirmation Template.oft") End If With Message 'Set destination email address .Recipients.Add (aTo) .Subject = Subject .cc = cc 'Set sender address If specified. If Len(aFrom) 0 Then .Recipients.Add(aFrom).Type = olOriginator .Attachments.Add strFile .Display End With End Sub "Tim" wrote: Hi There, I am automating the creation of emails in Excel VBA. The code works fine for most situations but on two PCs throws the error: One or more parameters could not be found. Has anyone had this problem? many thanks Tim |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating email with parameters | Jeppe Jespersen | Outlook - General Queries | 0 | May 18th 06 09:27 AM |
Cannot save new contact; invalid parameters | ClaireQ87 | Outlook - General Queries | 3 | May 14th 06 08:37 PM |
How do I change password/login parameters? | Bruce | Outlook Express | 1 | May 3rd 06 11:55 PM |
How do I pass parameters to application invoked by Outlook rule? | Sergy Stouk | Outlook - Installation | 1 | March 20th 06 12:18 PM |
Parameters not valid | Suedra | Outlook - Calandaring | 0 | February 24th 06 12:57 AM |