have a problem trying to get a URL in VBA, when using automation from "access ie 2003" with IE version 8. The code runs fine util it reaches the statement: artRSSFeed = .Document.Url Bare it in mind the previous URL assignment (FeedURL = .Document.Url) in the same instance of the browser was returned ok and the URL under the second .navigate is reached in the browser. The Error is: Runtime error '445' object doesn't support this action!
Thanks any help appreciated.
'Process artRSSPostLink in order to get feed name, Source permalink and RSS Feed
Set ie2 = CreateObject("InternetExplorer.Application")
With ie2
' Disable pop-up msgs
.Silent = True
.Navigate artRSSPostlink
Do While .ReadyState <> 4 Or ie.Busy = True
DoEvents
Loop
If Err Then .Quit Else .Visible = True
'The point of this is that the Postlink is often not hosted at the feed URL or even on the same server (feeddemon for instance) consequentally it is redirected
Dim FeedURL As String
FeedURL = .Document.Url
artSourcePostPermalink = FeedURL
'Dim artSource As String
artSource = Left(FeedURL, InStr(8, FeedURL, "/") - 1)
artSource = Right(artSource, Len(artSource) - 7) 'strip "http://"
'Me!artSource = artSource
'enter the domain/feed url to see if there is a redirect for the feed
.Navigate "http://" & artSource & "/feed"
Do While .ReadyState <> 4 Or ie.Busy = True
DoEvents
Loop
artRSSFeed = .Document.Url
End With