
why will this code not work
The address is not resolved. Try adding:
myForward.Recipients.ResolveAll
before you send it.
--
Sue Mosher, Outlook MVP
Outlook and Exchange Solutions
at http://www.slipstick.com
Quote:
> hello,
> this is my code
> Set myOlApp = CreateObject("Outlook.Application")
> Dim Myitem As MailItem
> Set Myitem = myOlApp.CreateItem(0)
> Set myForward = Myitem.Forward
> myForward.Subject = "The subject"
> myForward.HTMLBody = "some text"
> myForward.To = "DJ" 'the name exist in the adresbook
> myForward.Send
> the last line will not execute
> kind greatings Jan