A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Error 91



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3  
Old October 7th 07, 07:59 PM posted to microsoft.public.outlook.program_vba
Pierre Scerri
external usenet poster
 
Posts: 23
Default Error 91

Hi

Thanks a lot. That seems to have done the trick.



"Michael Bauer [MVP - Outlook]" wrote:



Before accessing the innertext property, check first if .Document is
nothing, then if .Document.Body is nothing.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
Organize eMails:
http://www.vboffice.net/product.html?id=2006063&cmd=detail&lang=en&pub=6

Am Sat, 6 Oct 2007 10:39:01 -0700 schrieb Pierre Scerri:

The following code is giving me the error:
Runtime error 91: 'Object variable of With Block variable not set'

...
If Iexplr Is Nothing Then Set Iexplr =
CreateObject("InternetExplorer.Application")
With Iexplr
.Navigate URL:=URL ' URL contains a valid

web
address
Do ' wait till
iexplore is done.
Loop Until .ReadyState = READYSTATE_COMPLETE
a = .Document.Body.innertext ' put the whole page into a
string

' more code
End With
...

This is part of a subroutine that retrieves plain text from a webpage for
further processing.

The error comes intermittently at the last line shown (a=
.Document.Body.innertext)
ie. I run it and the error comes up. I run it again and the code works.

Thank you for any suggestions


 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2007 error event id: 35 - Failed to determine if the store is in the crawl scope (error=0x80070002). [email protected] Outlook - General Queries 4 September 2nd 07 01:18 PM
Send Mail Socket Error: 10060, Error Number: 0x800CCC0E-help! David L.Chapman Outlook Express 0 July 4th 07 11:49 PM
error sku112.cab when installing oulook 07 error message 1311 Boomer Outlook - Installation 0 June 27th 07 01:34 AM
error prtocol smpt, port 25, no socket error,10061, nr 0x8ooCCC0e Larry W StJohn Outlook - General Queries 6 August 16th 06 02:39 PM
Outlook 2003 Calendar Error-CAN'T OPEN THIS ITEM. UNKNOWN ERROR Bluze Outlook - Calandaring 4 June 14th 06 04:35 AM


All times are GMT +1. The time now is 11:15 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.