Vba 如何避免运行时错误445-“;对象没有';“我不支持这一行动”;还做作业吗?

Vba 如何避免运行时错误445-“;对象没有';“我不支持这一行动”;还做作业吗?,vba,internet-explorer-8,ms-access-2003,Vba,Internet Explorer 8,Ms Access 2003,在ie版本8中使用“access ie 2003”中的自动化时,尝试在VBA中获取URL时遇到问题。 代码在到达以下语句时运行良好:artRSSFeed=.Document.Url 请记住,同一浏览器实例中的上一个URL分配(FeedURL=.Document.URL)已返回ok,第二个.navigate下的URL已在浏览器中到达。 错误是:运行时错误“445”对象不支持此操作 谢谢你的帮助,谢谢 'Process artRSSPostLink in order to get feed n

在ie版本8中使用“access ie 2003”中的自动化时,尝试在VBA中获取URL时遇到问题。 代码在到达以下语句时运行良好:artRSSFeed=.Document.Url 请记住,同一浏览器实例中的上一个URL分配(FeedURL=.Document.URL)已返回ok,第二个.navigate下的URL已在浏览器中到达。 错误是:运行时错误“445”对象不支持此操作

谢谢你的帮助,谢谢

   '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
”处理artRSSPostLink以获取提要名称、源永久链接和RSS提要
设置ie2=CreateObject(“InternetExplorer.Application”)
使用ie2
'禁用弹出式MSG
.Silent=True
.浏览artRSSPostlink
执行While.ReadyState 4或ie.Busy=True
多芬特
环
如果出错,则.Quit Else.Visible=True
'这一点是,Postlink通常不在提要URL上托管,甚至不在同一台服务器上(例如feeddemon),因此它会被重定向
将FeedURL设置为字符串
FeedURL=.Document.Url
ArtSourcePosterMarlink=FeedURL
'将artSource设置为字符串
artSource=左(FeedURL,InStr(8,FeedURL,“/”)-1)
artSource=Right(artSource,Len(artSource)-7)“strip”http://”
“我!artSource=artSource
'输入域/源url以查看是否存在该源的重定向
。导航“http://”&artSource&“/feed”
执行While.ReadyState 4或ie.Busy=True
多芬特
环
artRSSFeed=.Document.Url
以
安德鲁

对我来说,同样的场景也可以:Access 2003和IE8

好吧,我运行你的代码,除了我没有声明一个“ie”对象,所以我用ie2代替循环条件

我假设artRSSFeed是用字符串类型声明的


抱歉,没有提供更多帮助。

OK查看我看到的手表,文档显示“无变量”。我发现我可以从“ie2.LocationURL”中得到我想要的东西,但是在另一篇文章/来源上“.document.URL”是可用的,因此我想了解原因是什么,以及我应该使用哪些来保证所需的结果。安德鲁:你能先发布你导航到的网址吗?另外,当您退出最后一个循环时,因为它有两个条件,哪一个允许您退出?使用debug.print进行检查。