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

How to download Investment web site pdf file

3 views
Skip to first unread message

moonhk

unread,
Nov 5, 2009, 4:12:51 AM11/5/09
to
Hi All


IE 6.0, SP2

Open Investment web site, no id and password requeired.
But Need to select some items for download Fact Sheet.

How to using VBS to open the web site upto step 5 and then download
the PDF as below steps ?

Step 1. Open Main Screen
http://www.alliancebernstein.com/investments/ABII/GatewayPage.aspx

Step 2. Select "Asia/Pacific" -> Hongkong -> English

Step 3
Click "I Accept"

Step 4
Cick "Continue"

Step 5 - Input for AllianceBernstein - Global Growth Trends
Portfolio
http://www.alliancebernstein.com/investments/ABII/FundDetail.aspx?nid=7850&fndNumber=9924

Step 6 Select Fact Sheets on right hand side link
Fund Fact Sheet

Step 7. Will Open New window for display PDF

Step 8. Save the PDF

Step 9. Close current screen

Step 10. close all Opened windows

Tom Lavedas

unread,
Nov 5, 2009, 5:03:25 PM11/5/09
to
On Nov 5, 4:12 am, moonhk <moon...@gmail.com> wrote:
> Hi All
>
> IE 6.0, SP2
>
> Open Investment web site, no id and password requeired.
> But Need to select some items for download Fact Sheet.
>
> How to using VBS to open the web site upto step 5 and then download
> the PDF as below steps ?
>
> Step 1. Open Main Screenhttp://www.alliancebernstein.com/investments/ABII/GatewayPage.aspx

>
> Step 2. Select "Asia/Pacific" -> Hongkong -> English
>
> Step 3
> Click "I Accept"
>
> Step 4
> Cick "Continue"
>
> Step 5 - Input  for AllianceBernstein - Global Growth Trends
> Portfoliohttp://www.alliancebernstein.com/investments/ABII/FundDetail.aspx?nid...

>
> Step 6 Select Fact Sheets on right hand side link
> Fund Fact Sheet
>
> Step 7. Will Open New window for display PDF
>
> Step 8. Save the PDF
>
> Step 9. Close current screen
>
> Step 10. close all Opened windows

That is a lot to ask of people who volunteer there time. I played
with it and it's a lot of work. Plus, I provided you with an example
a couple of days ago that does a lot of what you are asking for.
Instead of saying you need to do this 10 step process, try coding it
and ask for help with specific problems. Otherwise, I suspect you
will wait a long time for help.
_____________________
Tom Lavedas

moonhk

unread,
Nov 6, 2009, 4:25:09 AM11/6/09
to
> Tom Lavedas- 隱藏被引用文字 -
>
> - 顯示被引用文字 -

Hi All

Actually, I want to try, But I does not know how to select the
hyperlink and set box and click the button.
And how to know the variable name in web page ?

Tom Lavedas

unread,
Nov 6, 2009, 1:56:48 PM11/6/09
to

Remember this from a couple of days ago?

sURL1 = "https://www.google.com/accounts/ServiceLogin?service=finance"
sURL2 = "http://www.google.com/finance/portfolio?action=view&pid=4"
sFilename = "D:\Someplace\somename.html"
with CreateObject("InternetExplorer.Application")
.Navigate sURL1
Do until .ReadyState = 4 : WScript.Sleep 100 : Loop
.visible = true
With .document.all
.email.value = "you...@yourdomain.com"
.passwd.value= "yourpassword" ' or Inputbox to ask the password
.signin.click
End With ' document
.Navigate sURL2
Do until .ReadyState = 4 : WScript.Sleep 100 : Loop
end with 'IE

Change the first URL to the page yo uare after in steps 1 & 2, that
is ...

http://www.alliancebernstein.com/INVESTMENTS/ABII/ACMShareHolderConfirmation.aspx?country=0285&lang=EN-HK

Note that it is reached by adding "country=0285&lang=EN-HK" after the
question mark. I found that out by observing the full address in the
Address Bar once the browser showed the page.

Then review the actual source for that page by right-clicking in the
window and selecting View Source. Search for the string 'checkbox'
and you should find the name of the element that you want to check.
Then issue the appropriate instruction. That is replace the two
statements after the" with .document.all" line with the following ...

With .document.all
.ucAccountHolderCheckBox.click
.ucContinueImageButton_AggImageButton.click
end with

I got the second name from looking a little further on in the source
to see what the element that represented the Continue button was
called.

That should get you to the next page, from which it will be possible
to navigate to the next page ...

http://www.alliancebernstein.com/investments/ABII/FundDetail.aspx?nid=7850&fndNumber=9924

Then that source of page needs to be parsed to find the proper URL for
the document you want, something like this ...

sText = .document.body.innerHTML
nPos = Instr(sText, "cid=") + 4
nCid = Mid(sText, nPos,5)
sUrlpdf = "http://www.alliancebernstein.com/investments/ABII/" _
& "DisplayFile.aspx?cid=" & nCID & "&listType=Fact
Sheet&download=true"

That should get you to the page.

See if you can get that far.
______________________
Tom Lavedas

Joe Fawcett

unread,
Nov 14, 2009, 4:37:36 AM11/14/09
to

"moonhk" <moo...@gmail.com> wrote in message
news:6b038383-1f27-49ef...@a39g2000pre.googlegroups.com...
>> Tom Lavedas- 嚙踝蕭嚙衛被嚙豬用歹蕭r -
>>
>> - 嚙踝蕭亶Q嚙豬用歹蕭r -

>
> Hi All
>
> Actually, I want to try, But I does not know how to select the
> hyperlink and set box and click the button.
> And how to know the variable name in web page ?
>
>
> Step 2. Select "Asia/Pacific" -> Hongkong -> English
>
> Step 3
> Click "I Accept"
>
> Step 4
> Cick "Continue"
>

I suggest you get hold of Fiddler from Microsoft. You can then record the
steps needed to retrieve your file and examine them to see exactly what URLs
and data need to be sent to the server.

--

Joe Fawcett
http://joe.fawcett.name

jonny

unread,
Nov 15, 2009, 3:28:15 AM11/15/09
to
There seems to have been an ie8 'wsh' 5.8 update with last windows update.

Please inform your clients, audience, 'dejavu' readers if necessary.

Thank You.


"Tom Lavedas" <tglb...@cox.net> wrote in message
news:3e065e0d-e3e9-41ea...@p23g2000vbl.googlegroups.com...


On Nov 6, 4:25 am, moonhk <moon...@gmail.com> wrote:

> > Tom Lavedas- 嚙踝蕭嚙衛被嚙豬用歹蕭r -
>
> > - 嚙踝蕭亶Q嚙豬用歹蕭r -

0 new messages