ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   createDocumentFromURL (https://www.excelbanter.com/excel-programming/324006-createdocumentfromurl.html)

Jack Clift[_2_]

createDocumentFromURL
 
Dear Sir,

I am using a macro to retreive multiple (100) pages from the web using
createDocumentFromUrl function. I receive the following IE message:

This page has an unspecified potential security flaw. Would you like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not receive this message.

Regards

JC

Tim Williams

createDocumentFromURL
 
Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the web
using
createDocumentFromUrl function. I receive the following IE message:

This page has an unspecified potential security flaw. Would you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not receive this
message.

Regards

JC




Jack Clift[_3_]

createDocumentFromURL
 
yes, it didn't work - the message is from IE, not excel

"Tim Williams" wrote:

Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the web
using
createDocumentFromUrl function. I receive the following IE message:

This page has an unspecified potential security flaw. Would you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not receive this
message.

Regards

JC





Tim Williams

createDocumentFromURL
 
Do you have an example URL which would provide the message?

Or try the workaround from he
http://athena.uwindsor.ca/units/its/...4?OpenDocument


Tim.


"Jack Clift" wrote in message
...
yes, it didn't work - the message is from IE, not excel

"Tim Williams" wrote:

Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the web
using
createDocumentFromUrl function. I receive the following IE message:

This page has an unspecified potential security flaw. Would you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not receive this
message.

Regards

JC







Jack Clift[_3_]

createDocumentFromURL
 
here's what I am using:
sURL =
"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=delayedqu ote&code=BHP"


"Tim Williams" wrote:

Do you have an example URL which would provide the message?

Or try the workaround from he
http://athena.uwindsor.ca/units/its/...4?OpenDocument


Tim.


"Jack Clift" wrote in message
...
yes, it didn't work - the message is from IE, not excel

"Tim Williams" wrote:

Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the web
using
createDocumentFromUrl function. I receive the following IE message:

This page has an unspecified potential security flaw. Would you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not receive this
message.

Regards

JC







Tim Williams

createDocumentFromURL
 
Doesn't give me a warning. Try adusting your IE settings.

Tim


"Jack Clift" wrote in message
...
here's what I am using:
sURL =
"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=delayedqu ote&code=BHP"


"Tim Williams" wrote:

Do you have an example URL which would provide the message?

Or try the workaround from he
http://athena.uwindsor.ca/units/its/...4?OpenDocument


Tim.


"Jack Clift" wrote in message
...
yes, it didn't work - the message is from IE, not excel

"Tim Williams" wrote:

Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in
message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the
web
using
createDocumentFromUrl function. I receive the following IE
message:

This page has an unspecified potential security flaw. Would
you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not
receive this
message.

Regards

JC









Jack Clift[_3_]

createDocumentFromURL
 
Dear Tim,

seems like your the only person that has responded to my multiple requests
on this issue. I have tried adjusting the ie settings, but did not manage to
solve the issue - sort of random changes to the ie options (which I am loathe
to take), I am stuck.

Any other ideas?

Thanks

JC

"Tim Williams" wrote:

Doesn't give me a warning. Try adusting your IE settings.

Tim


"Jack Clift" wrote in message
...
here's what I am using:
sURL =
"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=delayedqu ote&code=BHP"


"Tim Williams" wrote:

Do you have an example URL which would provide the message?

Or try the workaround from he
http://athena.uwindsor.ca/units/its/...4?OpenDocument


Tim.


"Jack Clift" wrote in message
...
yes, it didn't work - the message is from IE, not excel

"Tim Williams" wrote:

Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in
message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the
web
using
createDocumentFromUrl function. I receive the following IE
message:

This page has an unspecified potential security flaw. Would
you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not
receive this
message.

Regards

JC










Jack Clift[_3_]

createDocumentFromURL
 
PS think that it might have something to do with cookie handling, as there is
a similar issue reported in the MSDN knowledge base about unspecified
potential security issue.

refer:

http://support.microsoft.com/default...b;en-us;323034

does this prompt any ideas?

Regards

JC

"Tim Williams" wrote:

Doesn't give me a warning. Try adusting your IE settings.

Tim


"Jack Clift" wrote in message
...
here's what I am using:
sURL =
"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=delayedqu ote&code=BHP"


"Tim Williams" wrote:

Do you have an example URL which would provide the message?

Or try the workaround from he
http://athena.uwindsor.ca/units/its/...4?OpenDocument


Tim.


"Jack Clift" wrote in message
...
yes, it didn't work - the message is from IE, not excel

"Tim Williams" wrote:

Ave you tried

application.displayalerts=false

?

Tim.


"Jack Clift" <Jack wrote in
message
...
Dear Sir,

I am using a macro to retreive multiple (100) pages from the
web
using
createDocumentFromUrl function. I receive the following IE
message:

This page has an unspecified potential security flaw. Would
you
like to
continue?

Is there a way to supress this message.

Note that retreive the page manually with IE, I do not
receive this
message.

Regards

JC










Tim Williams

createDocumentFromURL
 
Maybe you could show your exact code - or at least the part which is
erroring out.
I noticed that the page does have a pop-up which launches on load -
don't know if that's the issue.

You could always try using XMLHTTP to grab the source, save it locally
and then open it from there.
Or just open the page directly in Excel.

Tim.


"Jack Clift" wrote in message
...
PS think that it might have something to do with cookie handling, as
there is
a similar issue reported in the MSDN knowledge base about
unspecified
potential security issue.

refer:

http://support.microsoft.com/default...b;en-us;323034

does this prompt any ideas?

Regards

JC

"Tim Williams" wrote:

Doesn't give me a warning. Try adusting your IE settings.

Tim




Jack Clift[_3_]

createDocumentFromURL
 
Here is the code, will try the xmlhttp stuff as suggested. Again, thanks for
the ongoing assistance.

JC

Function TradingRoomGetQuoteData(ByVal sWS As String) As Boolean
Dim oMSHTML As MSHTML.HTMLDocument
Dim oHTMLDoc As MSHTML.HTMLDocument
Dim oDataTable As MSHTML.HTMLTable
Dim oWebTables As Object

Dim oWB As Workbook
Dim oWSCompanyList As Worksheet

Dim sQuoteQuery As String
Dim sTableData As String
Dim sASXCodes As String
Dim sURL As String

Dim iLastCompanyRow As Integer
Dim iCompanyRow As Integer
Dim iTableRow As Integer
Dim iTableCell As Integer

Dim bFoundLast As Boolean, bFoundYield As Boolean, bFoundCap As Boolean

Set oMSHTML = New MSHTML.HTMLDocument

Set oWB = ActiveWorkbook
Set oWSCompanyList = oWB.Worksheets(sWS)

sURL =
"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=delayedqu ote&code="

iLastCompanyRow = oWSCompanyList.Cells.SpecialCells(xlLastCell).Row - 1

iCompanyRow = ASXLIST_OFFSET

Do While iCompanyRow <= iLastCompanyRow

sASXCodes = oWSCompanyList.Cells(iCompanyRow, 2).Value
'sQuoteQuery = sURL & "BHP"
sQuoteQuery = sURL & sASXCodes
Set oHTMLDoc = oMSHTML.createDocumentFromUrl(sQuoteQuery,
vbNullString)

While oHTMLDoc.readyState < "complete"
DoEvents
Wend
'other code here deleted for simplicity
iCompanyRow = iCompanyRow + 1
Loop

End Function


"Tim Williams" wrote:

Maybe you could show your exact code - or at least the part which is
erroring out.
I noticed that the page does have a pop-up which launches on load -
don't know if that's the issue.

You could always try using XMLHTTP to grab the source, save it locally
and then open it from there.
Or just open the page directly in Excel.

Tim.


"Jack Clift" wrote in message
...
PS think that it might have something to do with cookie handling, as
there is
a similar issue reported in the MSDN knowledge base about
unspecified
potential security issue.

refer:

http://support.microsoft.com/default...b;en-us;323034

does this prompt any ideas?

Regards

JC

"Tim Williams" wrote:

Doesn't give me a warning. Try adusting your IE settings.

Tim





Tim Williams

createDocumentFromURL
 
Try replacing this:
Set oHTMLDoc = oMSHTML.createDocumentFromUrl(sQuoteQuery, vbNullString)

with something like:
.....
dim oWB as workbook
....
set oWB=workbooks.open sQuoteQuery
'you should then be able to extract your information from the new workbook
oWB.close

Tim.


--
Tim Williams
Palo Alto, CA


"Jack Clift" wrote in message
...
Here is the code, will try the xmlhttp stuff as suggested. Again, thanks

for
the ongoing assistance.

JC

Function TradingRoomGetQuoteData(ByVal sWS As String) As Boolean
Dim oMSHTML As MSHTML.HTMLDocument
Dim oHTMLDoc As MSHTML.HTMLDocument
Dim oDataTable As MSHTML.HTMLTable
Dim oWebTables As Object

Dim oWB As Workbook
Dim oWSCompanyList As Worksheet

Dim sQuoteQuery As String
Dim sTableData As String
Dim sASXCodes As String
Dim sURL As String

Dim iLastCompanyRow As Integer
Dim iCompanyRow As Integer
Dim iTableRow As Integer
Dim iTableCell As Integer

Dim bFoundLast As Boolean, bFoundYield As Boolean, bFoundCap As

Boolean

Set oMSHTML = New MSHTML.HTMLDocument

Set oWB = ActiveWorkbook
Set oWSCompanyList = oWB.Worksheets(sWS)

sURL =

"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=
delayedquote&code="

iLastCompanyRow = oWSCompanyList.Cells.SpecialCells(xlLastCell).Row -

1

iCompanyRow = ASXLIST_OFFSET

Do While iCompanyRow <= iLastCompanyRow

sASXCodes = oWSCompanyList.Cells(iCompanyRow, 2).Value
'sQuoteQuery = sURL & "BHP"
sQuoteQuery = sURL & sASXCodes
Set oHTMLDoc = oMSHTML.createDocumentFromUrl(sQuoteQuery,
vbNullString)

While oHTMLDoc.readyState < "complete"
DoEvents
Wend
'other code here deleted for simplicity
iCompanyRow = iCompanyRow + 1
Loop

End Function


"Tim Williams" wrote:

Maybe you could show your exact code - or at least the part which is
erroring out.
I noticed that the page does have a pop-up which launches on load -
don't know if that's the issue.

You could always try using XMLHTTP to grab the source, save it locally
and then open it from there.
Or just open the page directly in Excel.

Tim.


"Jack Clift" wrote in message
...
PS think that it might have something to do with cookie handling, as
there is
a similar issue reported in the MSDN knowledge base about
unspecified
potential security issue.

refer:

http://support.microsoft.com/default...b;en-us;323034

does this prompt any ideas?

Regards

JC

"Tim Williams" wrote:

Doesn't give me a warning. Try adusting your IE settings.

Tim







Jack Clift[_3_]

createDocumentFromURL
 
the xmlhttp suggestion works well - I will stick that as it is cleaner for
what I am trying to do. With regard to suggestion below (also tried
successfully): surely it can't be that easy...

thanks for the help

"Tim Williams" wrote:

Try replacing this:
Set oHTMLDoc = oMSHTML.createDocumentFromUrl(sQuoteQuery, vbNullString)

with something like:
.....
dim oWB as workbook
....
set oWB=workbooks.open sQuoteQuery
'you should then be able to extract your information from the new workbook
oWB.close

Tim.


--
Tim Williams
Palo Alto, CA


"Jack Clift" wrote in message
...
Here is the code, will try the xmlhttp stuff as suggested. Again, thanks

for
the ongoing assistance.

JC

Function TradingRoomGetQuoteData(ByVal sWS As String) As Boolean
Dim oMSHTML As MSHTML.HTMLDocument
Dim oHTMLDoc As MSHTML.HTMLDocument
Dim oDataTable As MSHTML.HTMLTable
Dim oWebTables As Object

Dim oWB As Workbook
Dim oWSCompanyList As Worksheet

Dim sQuoteQuery As String
Dim sTableData As String
Dim sASXCodes As String
Dim sURL As String

Dim iLastCompanyRow As Integer
Dim iCompanyRow As Integer
Dim iTableRow As Integer
Dim iTableCell As Integer

Dim bFoundLast As Boolean, bFoundYield As Boolean, bFoundCap As

Boolean

Set oMSHTML = New MSHTML.HTMLDocument

Set oWB = ActiveWorkbook
Set oWSCompanyList = oWB.Worksheets(sWS)

sURL =

"http://tradingroom.com.au/apps/qt/quote.ac?section=quotedetail&sy=tpl&type=
delayedquote&code="

iLastCompanyRow = oWSCompanyList.Cells.SpecialCells(xlLastCell).Row -

1

iCompanyRow = ASXLIST_OFFSET

Do While iCompanyRow <= iLastCompanyRow

sASXCodes = oWSCompanyList.Cells(iCompanyRow, 2).Value
'sQuoteQuery = sURL & "BHP"
sQuoteQuery = sURL & sASXCodes
Set oHTMLDoc = oMSHTML.createDocumentFromUrl(sQuoteQuery,
vbNullString)

While oHTMLDoc.readyState < "complete"
DoEvents
Wend
'other code here deleted for simplicity
iCompanyRow = iCompanyRow + 1
Loop

End Function


"Tim Williams" wrote:

Maybe you could show your exact code - or at least the part which is
erroring out.
I noticed that the page does have a pop-up which launches on load -
don't know if that's the issue.

You could always try using XMLHTTP to grab the source, save it locally
and then open it from there.
Or just open the page directly in Excel.

Tim.


"Jack Clift" wrote in message
...
PS think that it might have something to do with cookie handling, as
there is
a similar issue reported in the MSDN knowledge base about
unspecified
potential security issue.

refer:

http://support.microsoft.com/default...b;en-us;323034

does this prompt any ideas?

Regards

JC

"Tim Williams" wrote:

Doesn't give me a warning. Try adusting your IE settings.

Tim









All times are GMT +1. The time now is 12:31 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com