![]() |
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
|
|||
|
|||
![]()
I have a word doc that can generate emails and send out them through outlook.
it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
Ads |
#2
|
|||
|
|||
![]()
Do you have any error handling in your code? Can you step through it without
error? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I have a word doc that can generate emails and send out them through outlook. it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
#3
|
|||
|
|||
![]()
I run the code step by step. there is no error when I debug it.
the code is like this: Private Sub SendEmail_Click() Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem 'Get Outlook if it's running Set oOutlookApp = GetObject(, "Outlook.Application") If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") End If 'Create a new mailitem Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .To = .CC = "Scheduler" .Subject = "subject" .Body = "Meeting Generated Task" + Chr(13) + "-----------------------------------" + Chr(13) 'Add flag .FlagDueBy = ActiveDocument.FormFields("End_Date").Result .FlagStatus = olFlagMarked .FlagIcon = olRedFlagIcon .Categories = ActiveDocument.FormFields("Categories").Result .Send End With 'Clean up Set oItem = Nothing Set oOutlookApp = Nothing End Sub "Eric Legault [MVP - Outlook]" wrote: Do you have any error handling in your code? Can you step through it without error? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I have a word doc that can generate emails and send out them through outlook. it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
#4
|
|||
|
|||
![]()
I changed the code .send to .display. the generated mail showed up in
outlook2007. but .send function seems not been performed. Whan should I do? Thanks a lot. "david f" wrote: I run the code step by step. there is no error when I debug it. the code is like this: Private Sub SendEmail_Click() Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem 'Get Outlook if it's running Set oOutlookApp = GetObject(, "Outlook.Application") If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") End If 'Create a new mailitem Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .To = .CC = "Scheduler" .Subject = "subject" .Body = "Meeting Generated Task" + Chr(13) + "-----------------------------------" + Chr(13) 'Add flag .FlagDueBy = ActiveDocument.FormFields("End_Date").Result .FlagStatus = olFlagMarked .FlagIcon = olRedFlagIcon .Categories = ActiveDocument.FormFields("Categories").Result .Send End With 'Clean up Set oItem = Nothing Set oOutlookApp = Nothing End Sub "Eric Legault [MVP - Outlook]" wrote: Do you have any error handling in your code? Can you step through it without error? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I have a word doc that can generate emails and send out them through outlook. it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
#5
|
|||
|
|||
![]()
I fixed it. the problem caused by the cc field. I have two people in
scheduler. so the mail did not send out. I found this problem by changing send to display, then clicked on send button. the mail did not send out because the system asked me to comfirm which scheduler i'd like to send to. I deleted that cc line then it works fine. Thank you very much. Have a great day! "david f" wrote: I changed the code .send to .display. the generated mail showed up in outlook2007. but .send function seems not been performed. Whan should I do? Thanks a lot. "david f" wrote: I run the code step by step. there is no error when I debug it. the code is like this: Private Sub SendEmail_Click() Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem 'Get Outlook if it's running Set oOutlookApp = GetObject(, "Outlook.Application") If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") End If 'Create a new mailitem Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .To = .CC = "Scheduler" .Subject = "subject" .Body = "Meeting Generated Task" + Chr(13) + "-----------------------------------" + Chr(13) 'Add flag .FlagDueBy = ActiveDocument.FormFields("End_Date").Result .FlagStatus = olFlagMarked .FlagIcon = olRedFlagIcon .Categories = ActiveDocument.FormFields("Categories").Result .Send End With 'Clean up Set oItem = Nothing Set oOutlookApp = Nothing End Sub "Eric Legault [MVP - Outlook]" wrote: Do you have any error handling in your code? Can you step through it without error? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I have a word doc that can generate emails and send out them through outlook. it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
#6
|
|||
|
|||
![]()
If you comment out Send and use thet Display method instead it will of course
not send the e-mail until the user clicks the Send button! Try commenting out all the MailItem properties you are setting except the ..To and .Subject lines, and try the Send method again. I have a hunch something is wrong with either the Cc, Body, Categories or Flag properties - but nothing that's obviously apparent. Is 'Scheduler' resolved if you manually type that in the To: field? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I changed the code .send to .display. the generated mail showed up in outlook2007. but .send function seems not been performed. Whan should I do? Thanks a lot. "david f" wrote: I run the code step by step. there is no error when I debug it. the code is like this: Private Sub SendEmail_Click() Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem 'Get Outlook if it's running Set oOutlookApp = GetObject(, "Outlook.Application") If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") End If 'Create a new mailitem Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .To = .CC = "Scheduler" .Subject = "subject" .Body = "Meeting Generated Task" + Chr(13) + "-----------------------------------" + Chr(13) 'Add flag .FlagDueBy = ActiveDocument.FormFields("End_Date").Result .FlagStatus = olFlagMarked .FlagIcon = olRedFlagIcon .Categories = ActiveDocument.FormFields("Categories").Result .Send End With 'Clean up Set oItem = Nothing Set oOutlookApp = Nothing End Sub "Eric Legault [MVP - Outlook]" wrote: Do you have any error handling in your code? Can you step through it without error? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I have a word doc that can generate emails and send out them through outlook. it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
#7
|
|||
|
|||
![]()
Thanks a lot! That really helps.
Have a great day "Eric Legault [MVP - Outlook]" wrote: If you comment out Send and use thet Display method instead it will of course not send the e-mail until the user clicks the Send button! Try commenting out all the MailItem properties you are setting except the .To and .Subject lines, and try the Send method again. I have a hunch something is wrong with either the Cc, Body, Categories or Flag properties - but nothing that's obviously apparent. Is 'Scheduler' resolved if you manually type that in the To: field? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I changed the code .send to .display. the generated mail showed up in outlook2007. but .send function seems not been performed. Whan should I do? Thanks a lot. "david f" wrote: I run the code step by step. there is no error when I debug it. the code is like this: Private Sub SendEmail_Click() Dim oOutlookApp As Outlook.Application Dim oItem As Outlook.MailItem 'Get Outlook if it's running Set oOutlookApp = GetObject(, "Outlook.Application") If Err 0 Then Set oOutlookApp = CreateObject("Outlook.Application") End If 'Create a new mailitem Set oItem = oOutlookApp.CreateItem(olMailItem) With oItem .To = .CC = "Scheduler" .Subject = "subject" .Body = "Meeting Generated Task" + Chr(13) + "-----------------------------------" + Chr(13) 'Add flag .FlagDueBy = ActiveDocument.FormFields("End_Date").Result .FlagStatus = olFlagMarked .FlagIcon = olRedFlagIcon .Categories = ActiveDocument.FormFields("Categories").Result .Send End With 'Clean up Set oItem = Nothing Set oOutlookApp = Nothing End Sub "Eric Legault [MVP - Outlook]" wrote: Do you have any error handling in your code? Can you step through it without error? -- Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "david f" wrote: I have a word doc that can generate emails and send out them through outlook. it works fine when I use outlook 2003(I chose yes when the outlook security asked me if I want to send mail). but after I upgrade to office 2007, even after I select "allow" on security warning, I check sent folder, there is no email sent out. and the receiver does not receive emails. What should I do to let macros in a word doc sending emails through outlook 2007? Thanks a lot! have a great day! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook 2007 cannot send emails but can recieve them ok? | Dougy | Outlook - Installation | 2 | July 27th 07 03:28 PM |
Unable to receive emails in Outlook 2007 but can send email no pro | braz | Outlook - Installation | 5 | July 24th 07 09:54 AM |
Outlook 2007 cannot send emails | john doe | Outlook - General Queries | 11 | April 10th 07 09:41 PM |
Unable to receive any emails. Can send emails OK | Davidd | Outlook Express | 2 | October 4th 06 01:30 PM |
Cant send emails and can only recieve emails from one msn account | [email protected] | Outlook Express | 2 | September 25th 06 09:13 PM |