Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Opening Web Pages in Outlook using VBA-Help Needed

1 view
Skip to first unread message

skandar taj

unread,
Feb 10, 2003, 9:50:20 AM2/10/03
to
I am new to VBA programming, can anyone tell me how you would open a web
page in outlook, i have created the following macro and it works fine
but when the web page opens all the colours are missing and lokns dont
work. How can you get the links to work and have the colours displayed
when the web page opens.


Many Thanks

skandar

Sub Send_weather()
Send_Message "http://www.msn.com", "ska...@zetacontrols.co.uk"

End Sub


Private Sub Send_Message(xURL, email)
Dim objIE As Object
Dim objOL As New Outlook.Application
Dim objMail As MailItem

Set objIE = CreateObject("InternetExplorer.Application")
objIE.Navigate (xURL)

Do While objIE.Busy
Loop

Do While objIE.Document.ReadyState <> "complete"
Loop




Set objOL = New Outlook.Application
Set objMail = objOL.CreateItem(olMailItem)
objMail.To = email
objMail.Subject = "From Street Map - " &
objIE.LocationName

objMail.HTMLBody = "<HTML></HTML>" &
objIE.Document.Body.outerHTML

objMail.Send
Set objMail = Nothing
Set objOL = Nothing
Set objIE = Nothing

End Sub


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Eric Legault

unread,
Feb 10, 2003, 5:37:16 PM2/10/03
to
See the following website: http://www.slipstick.com/mail1/html.htm

--
Eric Legault, MCSD
ADAPSYS - http://www.adapsys.ca


"skandar taj" <ska...@zetacontrols.co.uk> wrote in message
news:#XA48OR0CHA.2488@TK2MSFTNGP12...

Sue Mosher [MVP]

unread,
Feb 11, 2003, 1:04:56 AM2/11/03
to
Did you mean:

objMail.HTMLBody = "<HTML>" & _
objIE.Document.Body.outerHTML & "</HTML>"

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming: Jumpstart for
Administrators, Power Users, and Developers
Outlook and Exchange solutions at http://www.slipstick.com


"skandar taj" <ska...@zetacontrols.co.uk> wrote in message
news:#XA48OR0CHA.2488@TK2MSFTNGP12...

0 new messages