Jump to content
Sign in to follow this  

Auto vb script

Recommended Posts


Following is the source code :

<TD class="tbDivider" nowrap> <A class="tbButton" name="cbButton" id="forward" href="#" Title="Forward"><IMG align=absmiddle width="16" height="16" src="https://mail.bt.com/Exchweb/img/icon-msg-forward.gif"></A></TD>

By writing the script, i can reach on to the page of "sent items". Now By default 1st item is highlighted, which i want to forward.

Can you assist hot to click forward button (Script for the same is above)

Following is the script which i wrote :

Set WshShell = WScript.CreateObject("WScript.Shell")

Set oIE = CreateObject("InternetExplorer.Application")

variable1 = true

if (variable1 = true) then

Call Spectrum(oIE)

End If

Sub Spectrum(oIE)

oIE.Visible = True

oIE.Navigate "https://mail.bt.com/Exchweb/bin/auth/owalogon.asp?url=https://mail.bt.com/Exchange&reason=0"

Call wait(oIE)

set IEObj = oIE.document

IEObj.all.item("username").value = "*******"

IEObj.all.item("password").value = "******"


WScript.sleep 4000

oIE.Navigate "https://mail.bt.com/Exchange/JAINAJ/Sent%20Items/"

WScript.sleep 4000

WshShell.SendKeys "{ENTER}"

WScript.Sleep 4000


'WScript.sleep 4000

End Sub

Sub wait(IEInstance)

'Wait for IE to Load completly

While IEInstance.busy Or IEInstance.readyState <> 4

wscript.sleep 1000


End Sub

Please suggest !!!

Edited by Ashit

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.