Solved

Dell post a customer support request. Script to autofill the website.

Posted on 2008-06-23
61
777 Views
Last Modified: 2011-10-19
Hi,

Dell post a customer support request. Script to autofill the website.
As we have 100's of machines of dell.We frequently need to log calls with them for support.

Below is the link.

http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en

Serial no to get you into the form is

"H5QPG1S"

Need to fill the form from excel...
I shall have all the required details in what ever format you want. Need to post calls according to the excel data.

Regards
Sharath
0
Comment
Question by:bsharath
  • 40
  • 13
  • 8
61 Comments
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21858251
The following code I wrote ( assuming you are using IE 7 with tab viewing). Some things you need to know, you go to the page above and have it in the foreground as I did not add any type of enumeration detection for correct windows.

Visual Basic or VB Excel Macro should work.

' Add a reference to Microsoft HTML Object Library




Option Explicit

'http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3Bq249232
 

Private Type UUID

  Data1 As Long

  Data2 As Integer

  Data3 As Integer

  Data4(0 To 7) As Byte

End Type
 

Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" ( _

    Destination As Any, _

    ByVal Length As Long)
 

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _

    ByVal lpClassName As String, _

    ByVal lpWindowName As String) As Long
 

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _

    ByVal hWnd1 As Long, _

    ByVal hWnd2 As Long, _

    ByVal lpsz1 As String, _

    ByVal lpsz2 As String) As Long
 

Private Declare Function ObjectFromLresult Lib "oleacc" ( _

    ByVal lResult As Long, _

    riid As UUID, _

    ByVal wParam As Long, _

    ppvObject As Any) As Long
 

Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" ( _

    ByVal lpString As String) As Long
 

Private Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA" ( _

    ByVal hWnd As Long, _

    ByVal Msg As Long, _

    ByVal wParam As Long, _

    lParam As Any, _

    ByVal fuFlags As Long, _

    ByVal uTimeout As Long, _

    lpdwResult As Long) As Long
 

Private HtmlDoc As HTMLDocument
 

Private Function Generate(ByVal hWnd As Long) As IHTMLDocument
 

  Dim ID     As UUID

  Dim lngReg As Long

  Dim lngHnD As Long
 

  lngHnD = RegisterWindowMessage("WM_HTML_GETOBJECT")
 

  With ID

    .Data1 = &H626FC520

    .Data2 = &HA41E

    .Data3 = &H11CF

    .Data4(0) = &HA7

    .Data4(1) = &H31

    .Data4(2) = &H0

    .Data4(3) = &HA0

    .Data4(4) = &HC9

    .Data4(5) = &H8

    .Data4(6) = &H26

    .Data4(7) = &H37

  End With
 

  Call SendMessageTimeout(hWnd, lngHnD, 0, 0, &H2, 2000, lngReg)

  Call ZeroMemory(ID, Len(ID))

  Call ObjectFromLresult(lngReg, ID, 0, Generate)
 

End Function
 

Public Sub SendDataToWeb(NameID As String, MyValue As String)
 

    Dim lnghWnd As Long

    

    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)

  

    Set HtmlDoc = Generate(lnghWnd)

        HtmlDoc.getElementById(NameID).Value = MyValue

    Set HtmlDoc = Nothing
 

End Sub
 

Private Sub Command1_Click()

'// Example

    Call SendDataToWeb("ProblemType", "Computer")

    Call SendDataToWeb("OperatingSystem", "Windows XP")

    Call SendDataToWeb("ErrorDescription", "I need support!")

End Sub

Open in new window

0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21858442
I would like to post a correction as I noticed you will be filling in alot of fields. So you should change the procedure to the following.
Public Sub SendDataToWeb()
 

    Dim lnghWnd As Long

    

    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)

  

    Set HtmlDoc = Generate(lnghWnd)

        '// TODO: Proceed to fill out the form in here.

        HtmlDoc.getElementById("ProblemType").Value = "Computer"

        HtmlDoc.getElementById("OperatingSystem").Value = "Windows XP"

        HtmlDoc.getElementById("ErrorDescription").Value = "I need support!"

        '// END

    Set HtmlDoc = Nothing
 

End Sub
 
 

Private Sub Command1_Click()

Call SendDataToWeb
 

End Sub

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21862290
Thanks for the responce...
Is this a excel Macro?

How should the data be in the excel file...The fields in which colum which field...
0
 
LVL 11

Author Comment

by:bsharath
ID: 21862291
Thanks for the responce...
Is this a excel Macro?

How should the data be in the excel file...The fields in which colum which field...
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21863057
You should be able to add the code to a VB excel macro so that you can run the code. You need to add a reference to Microsoft HTML object library. The code really has nothing to do with excel itself it's just an example of how to auto fill a website with your information.

For example.
HtmlDoc.getElementById("ProblemType").Value = "Computer"

This changes the first combo field on the website to "Computer", (ProblemType) is the name= of the option combo on the website which you can see by right clicking the website and choosing "View Source".
0
 
LVL 11

Author Comment

by:bsharath
ID: 21871658
I get a compile error.

Should both the codes be in one..

Like the below
Option Explicit

'http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3Bq249232

 

Private Type UUID

  Data1 As Long

  Data2 As Integer

  Data3 As Integer

  Data4(0 To 7) As Byte

End Type

 

Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" ( _

    Destination As Any, _

    ByVal Length As Long)

 

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _

    ByVal lpClassName As String, _

    ByVal lpWindowName As String) As Long

 

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _

    ByVal hWnd1 As Long, _

    ByVal hWnd2 As Long, _

    ByVal lpsz1 As String, _

    ByVal lpsz2 As String) As Long

 

Private Declare Function ObjectFromLresult Lib "oleacc" ( _

    ByVal lResult As Long, _

    riid As UUID, _

    ByVal wParam As Long, _

    ppvObject As Any) As Long

 

Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" ( _

    ByVal lpString As String) As Long

 

Private Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA" ( _

    ByVal hWnd As Long, _

    ByVal Msg As Long, _

    ByVal wParam As Long, _

    lParam As Any, _

    ByVal fuFlags As Long, _

    ByVal uTimeout As Long, _

    lpdwResult As Long) As Long

 

Private HtmlDoc As HTMLDocument

 

Private Function Generate(ByVal hWnd As Long) As IHTMLDocument

 

  Dim ID     As UUID

  Dim lngReg As Long

  Dim lngHnD As Long

 

  lngHnD = RegisterWindowMessage("WM_HTML_GETOBJECT")

 

  With ID

    .Data1 = &H626FC520

    .Data2 = &HA41E

    .Data3 = &H11CF

    .Data4(0) = &HA7

    .Data4(1) = &H31

    .Data4(2) = &H0

    .Data4(3) = &HA0

    .Data4(4) = &HC9

    .Data4(5) = &H8

    .Data4(6) = &H26

    .Data4(7) = &H37

  End With

 

  Call SendMessageTimeout(hWnd, lngHnD, 0, 0, &H2, 2000, lngReg)

  Call ZeroMemory(ID, Len(ID))

  Call ObjectFromLresult(lngReg, ID, 0, Generate)

 

End Function

 

Public Sub SendDataToWeb(NameID As String, MyValue As String)

 

    Dim lnghWnd As Long

    

    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)

  

    Set HtmlDoc = Generate(lnghWnd)

        HtmlDoc.getElementById(NameID).Value = MyValue

    Set HtmlDoc = Nothing

 

End Sub

 

Private Sub Command1_Click()

'// Example

    Call SendDataToWeb("ProblemType", "Computer")

    Call SendDataToWeb("OperatingSystem", "Windows XP")

    Call SendDataToWeb("ErrorDescription", "I need support!")

End Sub

 

Public Sub SendDataToWeb()

 

    Dim lnghWnd As Long

    

    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)

  

    Set HtmlDoc = Generate(lnghWnd)

        '// TODO: Proceed to fill out the form in here.

        HtmlDoc.getElementById("ProblemType").Value = "Computer"

        HtmlDoc.getElementById("OperatingSystem").Value = "Windows XP"

        HtmlDoc.getElementById("ErrorDescription").Value = "I need support!"

        '// END

    Set HtmlDoc = Nothing

 

End Sub

 

 

Private Sub Command1_Click()

Call SendDataToWeb

 

End Sub

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21871659
I get a compile error.

Should both the codes be in one..

Like the below
Option Explicit

'http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3Bq249232

 

Private Type UUID

  Data1 As Long

  Data2 As Integer

  Data3 As Integer

  Data4(0 To 7) As Byte

End Type

 

Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" ( _

    Destination As Any, _

    ByVal Length As Long)

 

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _

    ByVal lpClassName As String, _

    ByVal lpWindowName As String) As Long

 

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _

    ByVal hWnd1 As Long, _

    ByVal hWnd2 As Long, _

    ByVal lpsz1 As String, _

    ByVal lpsz2 As String) As Long

 

Private Declare Function ObjectFromLresult Lib "oleacc" ( _

    ByVal lResult As Long, _

    riid As UUID, _

    ByVal wParam As Long, _

    ppvObject As Any) As Long

 

Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" ( _

    ByVal lpString As String) As Long

 

Private Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA" ( _

    ByVal hWnd As Long, _

    ByVal Msg As Long, _

    ByVal wParam As Long, _

    lParam As Any, _

    ByVal fuFlags As Long, _

    ByVal uTimeout As Long, _

    lpdwResult As Long) As Long

 

Private HtmlDoc As HTMLDocument

 

Private Function Generate(ByVal hWnd As Long) As IHTMLDocument

 

  Dim ID     As UUID

  Dim lngReg As Long

  Dim lngHnD As Long

 

  lngHnD = RegisterWindowMessage("WM_HTML_GETOBJECT")

 

  With ID

    .Data1 = &H626FC520

    .Data2 = &HA41E

    .Data3 = &H11CF

    .Data4(0) = &HA7

    .Data4(1) = &H31

    .Data4(2) = &H0

    .Data4(3) = &HA0

    .Data4(4) = &HC9

    .Data4(5) = &H8

    .Data4(6) = &H26

    .Data4(7) = &H37

  End With

 

  Call SendMessageTimeout(hWnd, lngHnD, 0, 0, &H2, 2000, lngReg)

  Call ZeroMemory(ID, Len(ID))

  Call ObjectFromLresult(lngReg, ID, 0, Generate)

 

End Function

 

Public Sub SendDataToWeb(NameID As String, MyValue As String)

 

    Dim lnghWnd As Long

    

    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)

  

    Set HtmlDoc = Generate(lnghWnd)

        HtmlDoc.getElementById(NameID).Value = MyValue

    Set HtmlDoc = Nothing

 

End Sub

 

Private Sub Command1_Click()

'// Example

    Call SendDataToWeb("ProblemType", "Computer")

    Call SendDataToWeb("OperatingSystem", "Windows XP")

    Call SendDataToWeb("ErrorDescription", "I need support!")

End Sub

 

Public Sub SendDataToWeb()

 

    Dim lnghWnd As Long

    

    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)

    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)

  

    Set HtmlDoc = Generate(lnghWnd)

        '// TODO: Proceed to fill out the form in here.

        HtmlDoc.getElementById("ProblemType").Value = "Computer"

        HtmlDoc.getElementById("OperatingSystem").Value = "Windows XP"

        HtmlDoc.getElementById("ErrorDescription").Value = "I need support!"

        '// END

    Set HtmlDoc = Nothing

 

End Sub

 

 

Private Sub Command1_Click()

Call SendDataToWeb

 

End Sub

Open in new window

0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21871680
What you can do is open the excel vb macro editor, Add a module.bas file then copy this into the module.bas file.

'// Module Code

Option Explicit
'http://support.microsoft.com/default.aspx?scid=kb%3BEN-US%3Bq249232
 
Private Type UUID
  Data1 As Long
  Data2 As Integer
  Data3 As Integer
  Data4(0 To 7) As Byte
End Type
 
Private Declare Sub ZeroMemory Lib "kernel32.dll" Alias "RtlZeroMemory" ( _
    Destination As Any, _
    ByVal Length As Long)
 
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
    ByVal lpClassName As String, _
    ByVal lpWindowName As String) As Long
 
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" ( _
    ByVal hWnd1 As Long, _
    ByVal hWnd2 As Long, _
    ByVal lpsz1 As String, _
    ByVal lpsz2 As String) As Long
 
Private Declare Function ObjectFromLresult Lib "oleacc" ( _
    ByVal lResult As Long, _
    riid As UUID, _
    ByVal wParam As Long, _
    ppvObject As Any) As Long
 
Private Declare Function RegisterWindowMessage Lib "user32" Alias "RegisterWindowMessageA" ( _
    ByVal lpString As String) As Long
 
Private Declare Function SendMessageTimeout Lib "user32" Alias "SendMessageTimeoutA" ( _
    ByVal hWnd As Long, _
    ByVal Msg As Long, _
    ByVal wParam As Long, _
    lParam As Any, _
    ByVal fuFlags As Long, _
    ByVal uTimeout As Long, _
    lpdwResult As Long) As Long
 
Private HtmlDoc As HTMLDocument
 
Private Function Generate(ByVal hWnd As Long) As IHTMLDocument
 
  Dim ID     As UUID
  Dim lngReg As Long
  Dim lngHnD As Long
 
  lngHnD = RegisterWindowMessage("WM_HTML_GETOBJECT")
 
  With ID
    .Data1 = &H626FC520
    .Data2 = &HA41E
    .Data3 = &H11CF
    .Data4(0) = &HA7
    .Data4(1) = &H31
    .Data4(2) = &H0
    .Data4(3) = &HA0
    .Data4(4) = &HC9
    .Data4(5) = &H8
    .Data4(6) = &H26
    .Data4(7) = &H37
  End With
 
  Call SendMessageTimeout(hWnd, lngHnD, 0, 0, &H2, 2000, lngReg)
  Call ZeroMemory(ID, Len(ID))
  Call ObjectFromLresult(lngReg, ID, 0, Generate)
 
End Function

Public Sub SendDataToWeb()
 
    Dim lnghWnd As Long
   
    lnghWnd = FindWindowEx(0, 0, "ieframe", vbNullString)
    lnghWnd = FindWindowEx(lnghWnd, 0, "TabWindowClass", vbNullString)
    lnghWnd = FindWindowEx(lnghWnd, 0, "shell docobject view", vbNullString)
    lnghWnd = FindWindowEx(lnghWnd, 0, "Internet Explorer_Server", vbNullString)
 
    Set HtmlDoc = Generate(lnghWnd)
        '// TODO: Proceed to fill out the form in here.
        HtmlDoc.getElementById("ProblemType").Value = "Computer"
        HtmlDoc.getElementById("OperatingSystem").Value = "Windows XP"
        HtmlDoc.getElementById("ErrorDescription").Value = "I need support!"
        '// END
    Set HtmlDoc = Nothing
 
End Sub

'// Then for the form.
'Then to test it create a button on the form , double click the button and add the following code below.
'note: make sure you have the dell support site open
Call SendDataToWeb

0
 
LVL 11

Author Comment

by:bsharath
ID: 21871701
Did as you said

Get this error attached when debug goes here

HtmlDoc.getElementById("ProblemType").Value = "Computer"
ScreenShot048.bmp
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21871908
Did you add a reference to Microsoft HTML object library?
0
 
LVL 11

Author Comment

by:bsharath
ID: 21872009
Yes i did....
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21872072
What browser are you using? The above code assumes you are using Internet Explorer 7 with tabbed views. If this is the browser you have then you need to go to
http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en
Type in: and make sure the browser is in the foreground
H5QPG1S
0
 
LVL 11

Author Comment

by:bsharath
ID: 21872378
Yes i have Ie 7.0 i am able to go to the link and enter the serial no to post a call....
0
 
LVL 11

Author Comment

by:bsharath
ID: 21872381
Yes i have Ie 7.0 i am able to go to the link and enter the serial no to post a call....
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21876786
<<  i am able to go to the link and enter the serial no to post a call....

If I understand your last comment, it seems that it's working for you now?
0
 
LVL 11

Author Comment

by:bsharath
ID: 21876886
No i meant doing it manually.
Manually i go to the website in my IE 7.0 and put in the service tag. And click enter. I go into the call raising screen.

But through script i am not able to go...
Get Run time error 91
0
 
LVL 29

Expert Comment

by:nffvrxqgrcfqvvc
ID: 21877248
Add this line directly under the. It should return ( Dell - Support ) if it's not then the support site is night in the foreground
'// TODO: Proceed to fill out the form in here.
Debug.Print HtmlDoc.Title
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21880578
Try this code.  Also attached is a sample Excel file.

At this stage, I haven't got a Dell Case to lodge, so I can't fully test it.  This currently does not submit a case.  I want to wait to see what the confirmation page looks like, so I can try to get the case reference number back to column W.  After you submit one, can you please post a screenshot of the case reference screen, and I will try to have it automatically gather that.  To get this right, we'd be best off testing with one case in the excel file at a time.

Regards,

Rob.
Set objIE = CreateObject("InternetExplorer.Application")

objIE.Visible = True

objIE.Navigate "about:blank"

While objIE.ReadyState <> 4

	WScript.Sleep 100

Wend
 

strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"
 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)
 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then
 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)
 

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

		End If

	End If

Next
 

MsgBox "Done"

Open in new window

Support-Details.xls
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880657
Thanks Rob...
Is this a excel Macro.?
As i dont get any Macro name to run it?
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880658
Thanks Rob...
Is this a excel Macro.?
As i dont get any Macro name to run it?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21880675
No, it's a VBS file.

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880692
Rob i get this

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      27
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880693
Rob i get this

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      27
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21880728
Wow, that's odd....it worked for me....

Is it possible for you to try it with IE6?

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880768
Tried in IE 6.0 now and get this

---------------------------
Windows Script Host
---------------------------
Script:      C:\Call Log.vbs
Line:      27
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880769
Tried in IE 6.0 now and get this

---------------------------
Windows Script Host
---------------------------
Script:      C:\Call Log.vbs
Line:      27
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21880806
Hmmm, does the internet page come up with the following?
DellSupportCallPage.jpg
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880829
Ie 6.0 its a blank page but in Ie 7.0 yes it opens the page...
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880830
Ie 6.0 its a blank page but in Ie 7.0 yes it opens the page...
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880858
Sorry Rob.. Internet was down on the IE 6.0 machine.
It works perfect by getting all excel data into the dell site...
Can this be done in ie 7.0 also?

Now i get all data into the website....

But not in Ie 7.0
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 
LVL 65

Expert Comment

by:RobSampson
ID: 21880865
OK, I just discovered that
            While objIE.ReadyState <> 4
                  WScript.Sleep 100
            Wend

doesn't work that well with IE7, so I've added
            While objIE.busy = True
                  WScript.Sleep 100
            Wend


Regards,

Rob.
Set objIE = CreateObject("InternetExplorer.Application")

objIE.Visible = True

objIE.Navigate "about:blank"

While objIE.ReadyState <> 4

	WScript.Sleep 100

Wend
 

strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"
 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)
 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then
 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)
 

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.busy = True

			WScript.Sleep 100

		Wend

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

		End If

	End If

Next
 

MsgBox "Done"

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21880881
Rob i get this...

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      30
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------

The machine where Ie 7.0 is there when run opens 2 Ie windows .1 is blank and other gets to the page
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880882
Rob i get this...

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      30
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------

The machine where Ie 7.0 is there when run opens 2 Ie windows .1 is blank and other gets to the page
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21880899
Hmmm, IE 7 with its multipage browsing, so annoying....try this then, with only one row in the Excel file....
strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"
 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)
 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then
 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)
 

		Set objIE = CreateObject("InternetExplorer.Application")

		objIE.Visible = True

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.busy = True

			WScript.Sleep 100

		Wend

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

		End If

		'objIE.Quit

	End If

Next
 

MsgBox "Done"

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21880912
Rob get this

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      25
Char:      3
Error:      Object doesn't support this property or method: 'objIE.document.all.frmServiceTagSelect'
Code:      800A01B6
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------

It opens 2 windows 1 has the dell page opened where we need to enter the service tag and other is just blank
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21880940
Hmmm, can you please make that dell support page a "Trusted Site"?

I take is that the error MsgBox is appearing before the page has even finished loading? This is problem....we need to make the script wait for the page to fully load.....and if it loads new windows, I think this becomes a problem....

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880968
Awesome now i get the data to the page... :-))
After trusting the link
0
 
LVL 11

Author Comment

by:bsharath
ID: 21880969
Awesome now i get the data to the page... :-))
After trusting the link
0
 
LVL 11

Author Comment

by:bsharath
ID: 21881070
Rob attached are 2 screen shots.
1 is once i click the submit button goes there after the 2 nd submit it goes to another page
ScreenShot049.bmp
ScreenShot050.bmp
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21881515
Awesome!  OK, yeah, Now I remember there *are* two pages...

OK Great.  Hopefully one last thing I need from you then....
On screen number one that you posted, where you need to click Submit, if you hover your mouse over that Submit button, down the bottom of the browser window, you should see something like

javascript:XXXXXX();

You know, in the part of the browser that shows you the address a link goes to.....well, I need to know exactly what that says, case sensitive.

Then I can try to make that automatic.

Regards,

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21881606
Rob in the first screen where all the data is entered attached the screenshot...
The next page does not have a taskbar .It does not show any data.


ScreenShot051.bmp
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21892356
Hi Sharath, I didn't notice there's no taskbar on the second window.  I already had the first one, it's sitting there waiting to be executed, currently commented out...
                  'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

so, instead, we'll need to "View Source" on the second page, and search for the instance of "javascript:" that relates to the submit link, to get the function name that it calls.

If you can find that, that would be great if you could fine them (there may be more than one "javascript:" written in the code, so just post them all), otherwise, I'll probably have a case next week to lodge....

Regards,

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21893164
Rob in the 2nd page not able to right click

With the present code in the excel that you have attached you will be able to go to the 2nd page.... Only after you click submit on the 2nd page will you go to the submitting of the problem. So can you please go and see what happens.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21896397
Hi Rob...Hope you had a great weekend...:-))

Any help on this
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23515354.html
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21896690
Hi Sharath, my weekend was very busy!

With this one...I may have figured out how to bypass the first screen.....see if this works....I'm not sure if I got the case number bit right....see if Column W gets the right case number....

If not, can I get you to "view source" when it gets to that page, and find the "Case number: " bit for me?

This hopefully WILL submit a job, so make sure it's one you actually want to submit  :-)

Regards,

Rob.
Set objIE = CreateObject("InternetExplorer.Application")

objIE.Visible = True

objIE.Navigate "about:blank"

While objIE.ReadyState <> 4

	WScript.Sleep 100

Wend

 

strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"

 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)

 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then

 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)

 

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.busy = True

			WScript.Sleep 100

		Wend

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

			objIE.document.frames.execScript "window.document.formEmailDell.submit();", "JavaScript"

			

			'strOuterText = objIE.document.documentElement.outerHTML

			'Set objFSO = CreateObject("Scripting.FileSystemObject")

			'Set objPage = objFSO.CreateTextFile("OuterText.html", True)

			'objPage.Write strOuterText

			'objPage.Close

			'Set objPage = Nothing
 

			While objIE.busy = True

				WScript.Sleep 100

			Wend

			While objIE.ReadyState <> 4

				WScript.Sleep 100

			Wend

			intCaseNumPos = InStr(LCase(document.body.innerHTML), "case number: <b>")

			strCaseNum = "Unknown"

			If intCaseNumPos > 0 Then

				intCaseNumPos = intCaseNumPos + 16

				strCaseNum = Mid(document.body.innerHTML, intCaseNumPos, InStr(intCaseNumPos, document.body.innerHTML, "<"))

			End If

			objSheet.Cells(intRow, "W").Value = strCaseNum

			

		End If

	End If

Next

 

MsgBox "Done"

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21896717
Rob i get this...

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      133
Char:      4
Error:      Object required: 'document'
Code:      800A01A8
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------

All the data is entered into the IE but get this error.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21896718
Rob i get this...

---------------------------
Windows Script Host
---------------------------
Script:      E:\Call Log.vbs
Line:      133
Char:      4
Error:      Object required: 'document'
Code:      800A01A8
Source:       Microsoft VBScript runtime error

---------------------------
OK  
---------------------------

All the data is entered into the IE but get this error.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21896723
Hmmm, by that stage, does it actually submit the form?

Rob.
Set objIE = CreateObject("InternetExplorer.Application")

objIE.Visible = True

objIE.Navigate "about:blank"

While objIE.ReadyState <> 4

	WScript.Sleep 100

Wend

 

strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"

 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)

 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then

 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)

 

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.busy = True

			WScript.Sleep 100

		Wend

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

			objIE.document.frames.execScript "window.document.formEmailDell.submit();", "JavaScript"

			

			'strOuterText = objIE.document.documentElement.outerHTML

			'Set objFSO = CreateObject("Scripting.FileSystemObject")

			'Set objPage = objFSO.CreateTextFile("OuterText.html", True)

			'objPage.Write strOuterText

			'objPage.Close

			'Set objPage = Nothing
 

			While objIE.busy = True

				WScript.Sleep 100

			Wend

			While objIE.ReadyState <> 4

				WScript.Sleep 100

			Wend

			intCaseNumPos = InStr(LCase(objIE.document.body.innerHTML), "case number: <b>")

			strCaseNum = "Unknown"

			If intCaseNumPos > 0 Then

				intCaseNumPos = intCaseNumPos + 16

				strCaseNum = Mid(objIE.document.body.innerHTML, intCaseNumPos, InStr(intCaseNumPos, objIE.document.body.innerHTML, "<"))

			End If

			objSheet.Cells(intRow, "W").Value = strCaseNum

			

		End If

	End If

Next

 

MsgBox "Done"

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21896746
Rob i think we are to the end...
I got say 10 + mails with different case id's...
Trying this....

I got this in colum "W" The call is raised.....

"20080630001139169</B></P></SPAN><BR></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD width=4><IMG height=1 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=4></TD>
<TD vAlign=top width=181>
<TABLE cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE height=22 cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR class=rowsolid>
<TD class=fragsolid width=""100%"">
<H2 class=titlestylesolid>Need More Help?</H2></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top width=181>
<TABLE cellSpacing=0 cellPadding=3 width=181 border=0>
<TBODY>
<TR>
<TD vAlign=top width=40><A href=""/support/topics/topic.aspx/ap/shared/support/en/product_support_central?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><IMG alt=""Technical Support"" src=""http://i.dell.com/images/global/support/Troubleshooting_50x50.jpg"" border=0></A></TD>
<TD vAlign=top align=right width=4><A href=""/support/topics/topic.aspx/ap/shared/support/en/product_support_central?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><IMG height=17 alt="""" src=""http://i.dell.com/images/global/brand/ui/secondary.gif"" width=4 border=0></A></TD>
<TD vAlign=top width=""100%""><A class=lnk id="""" href=""/support/topics/topic.aspx/ap/shared/support/en/product_support_central?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Troubleshooting and FAQs</A></TD></TR>
<TR>
<TD vAlign=center background=http://i.dell.com/images/global/brand/ui/hsep.gif colSpan=3><SMALL>&nbsp;</SMALL></TD></TR>
<TR>
<TD vAlign=top width=40><A href=""http://www.dellcommunity.com"" target=popup><IMG alt="""" src=""http://i.dell.com/images/global/support/chat/Forum_32x32.jpg"" border=0></A></TD>
<TD vAlign=top align=right width=4><A href=""http://www.dellcommunity.com"" target=popup><IMG height=17 alt="""" src=""http://i.dell.com/images/global/brand/ui/secondary.gif"" width=4 border=0></A></TD>
<TD vAlign=top width=""100%""><A class=lnk id="""" href=""http://www.dellcommunity.com"" target=popup>Talk with other Customers in the Forum</A></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><IMG height=4 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1></TD></TR>
<TR>
<TD><IMG height=4 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1></TD></TR>
<TR>
<TD vAlign=top>
<TABLE height=22 cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR class=rowsolid>
<TD class=fragsolid width=""100%"">
<H2 class=titlestylesolid>My Account</H2></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top width=181>
<FORM onkeypress=javascript:onKeyPress(this); style=""PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"" name=frmMyAccountLogin action=https://supportapj.dell.com/support/supportrequests/apj/create.aspx?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd method=post><INPUT type=hidden value=http:// name=ModalLoginProtocol><INPUT type=hidden value=true name=Login><INPUT type=hidden value=http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&amp;c=in&amp;l=en name=ReferrerURL>
<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR>
<TD class=title_emph colSpan=2>Please login to create a Support Request</TD></TR>
<TR>
<TD><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD colSpan=2><SPAN class=para>E-mail Address:</SPAN><BR><INPUT onkeypress=""if (event.keyCode==13) this.form.submit();"" name=email></TD></TR>
<TR>
<TD><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD colSpan=2><SPAN class=para>Password:</SPAN><BR><INPUT onkeypress=""if (event.keyCode==13) this.form.submit();"" type=password value="""" name=password><BR><A href=""/support/topics/topic.aspx/ap/shared/support/personalize/en/emailpassword?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><SPAN class=para_small>Forgot Password?</SPAN></A></TD></TR>
<TR>
<TD><IMG height=10 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=2 border=0>
<TBODY>
<TR>
<TD vAlign=top width=17><IMG height=17 alt="""" src=""http://i.dell.com/images/global/brand/ui/primary.gif"" width=21 border=0></TD>
<TD vAlign=center align=left><A class=lnk id=ctl16 href=""javascript:window.document.frmMyAccountLogin.submit();"">Sign In</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR>
<TD>
<HR align=left width=""100%"" color=#aaaaaa noShade SIZE=1>
</TD></TR>
<TR>
<TD><IMG height=3 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD class=title_emph>Don't have an account?</TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=2 border=0>
<TBODY>
<TR>
<TD><A class=lnk href=""/support/topics/topic.aspx/ap/shared/support/personalize/en/register?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><IMG src=""http://i.dell.com/images/global/brand/ui/secondary.gif"" border=0></A></TD>
<TD vAlign=center><A class=lnk href=""/support/topics/topic.aspx/ap/shared/support/personalize/en/register?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Register &amp; Personalize</A></TD></TR></TBODY></TABLE></FORM>
<DIV></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV><!-- content_end-->
<SCRIPT language=javascript>writeFooterBegin();</SCRIPT>

<DIV style=""WIDTH: 100%; PADDING-TOP: 10px"">
<TABLE style=""BORDER-TOP: #999999 1px outset; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; PADDING-TOP: 4px; BORDER-BOTTOM: #999999 1px inset"" height=25 cellSpacing=0 width=""100%"" border=0 cellpading=""0"">
<TBODY>
<TR>
<TD style=""PADDING-LEFT: 15px"">
<DIV class=para_crumb_43><SPAN style=""FONT-WEIGHT: bold"">You are here:&nbsp;</SPAN><A class=lnk_crumb43 href=""http://www1.us.dell.com/content/default.aspx?c=in&amp;l=en&amp;s=bsd&amp;~ck=bt"">Dell India</A>&nbsp;&gt;&nbsp;<A class=lnk_crumb43 href=""/support/index.aspx?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd&amp;~ck=bt"">Support Home Page</A></DIV></TD>
<TD noWrap align=right></TD></TR></TBODY></TABLE></DIV>
<DIV class=para_small id=footer style=""PADDING-RIGHT: 20px; PADDING-LEFT: 20px; PADDING-BOTTOM: 5px; PADDING-TOP: 15px; BACKGROUND-COLOR: white; TEXT-ALIGN: left""></DIV>
<TABLE style=""PADDING-LEFT: 10px"" cellSpacing=0 cellPadding=0 width=""100%"" bgColor=#ededed border=0>
<TBODY>
<TR>
<TD colSpan=2><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD vAlign=top align=middle width=""100%"">
<P class=para_small>All rights reserved : <A id="""" href=""http://www1.ap.dell.com/content/topics/global.aspx/corp/en/home?c=in&amp;cs=inbsd1&amp;l=en&amp;s=corp"" target=popup_window1>About Dell</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/use?c=in&amp;cs=inbsd1&amp;l=en&amp;s=gen"" target=popup_window1>Site Terms</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/terms_ss?c=in&amp;cs=inbsd1&amp;l=en&amp;s=gen"" target=popup_window1>Terms and Conditions</A> | <A id="""" href=""/support/topics/topic.aspx/ap/shared/support/dellcare/en/outstanding_issues?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Unresolved Issues</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/privacy?c=in&amp;cs=inbsd1&amp;l=en&amp;s=gen"" target=popup_window1>Privacy</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/topics/main/en/sitemap?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Site Map</A> | <A class=oplabs href=""javascript:doOpionlabs();O_LC();"">Feedback</A></P>
<SCRIPT language=JavaScript type=text/javascript>
            document.write('<sc'+'ript');
            document.write(' type=""text/javascript""');
            document.write(' language=""JavaScript""');
            document.write(' src=""'+m_imgPfx+'/images/global/js/s_code_dell.js'+'"">');
            document.write('</sc'+'ript>');
            </SCRIPT>

<SCRIPT language=JavaScript src=""http://i.dell.com/images/global/js/s_code_dell.js"" type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript type=text/javascript>
            s_dell.pageName="""";
            var s_code=s_dell.t();if(s_code)document.write(s_code);
            </SCRIPT>
</TD>
<TD>
<TABLE>
<TBODY>
<TR>
<TD vAlign=center><IMG height=4 alt="""" src=""http://i.dell.com/images/global/brand/ui/arrow_top.gif"" width=7 border=0></TD>
<TD style=""PADDING-RIGHT: 6px"" vAlign=center><A href=""#mastheadtop""><SPAN class=para>Top</SPAN></A></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=2><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD bgColor=#cdcdcd colSpan=2><IMG height=1 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript type=text/javascript>
m_pzationPageHash="""";
</SCRIPT>
<FONT color=#ffffff>sn WEB3</FONT></TD></TR></TBODY></TABLE></TD></TR></TABLE>
<SCRIPT language=JavaScript>
sReady();
</SCRIPT>"
0
 
LVL 11

Author Comment

by:bsharath
ID: 21896747
Rob i think we are to the end...
I got say 10 + mails with different case id's...
Trying this....

I got this in colum "W" The call is raised.....

"20080630001139169</B></P></SPAN><BR></FORM></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD>
<TD width=4><IMG height=1 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=4></TD>
<TD vAlign=top width=181>
<TABLE cellSpacing=0 cellPadding=0>
<TBODY>
<TR>
<TD vAlign=top>
<TABLE height=22 cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR class=rowsolid>
<TD class=fragsolid width=""100%"">
<H2 class=titlestylesolid>Need More Help?</H2></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top width=181>
<TABLE cellSpacing=0 cellPadding=3 width=181 border=0>
<TBODY>
<TR>
<TD vAlign=top width=40><A href=""/support/topics/topic.aspx/ap/shared/support/en/product_support_central?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><IMG alt=""Technical Support"" src=""http://i.dell.com/images/global/support/Troubleshooting_50x50.jpg"" border=0></A></TD>
<TD vAlign=top align=right width=4><A href=""/support/topics/topic.aspx/ap/shared/support/en/product_support_central?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><IMG height=17 alt="""" src=""http://i.dell.com/images/global/brand/ui/secondary.gif"" width=4 border=0></A></TD>
<TD vAlign=top width=""100%""><A class=lnk id="""" href=""/support/topics/topic.aspx/ap/shared/support/en/product_support_central?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Troubleshooting and FAQs</A></TD></TR>
<TR>
<TD vAlign=center background=http://i.dell.com/images/global/brand/ui/hsep.gif colSpan=3><SMALL>&nbsp;</SMALL></TD></TR>
<TR>
<TD vAlign=top width=40><A href=""http://www.dellcommunity.com"" target=popup><IMG alt="""" src=""http://i.dell.com/images/global/support/chat/Forum_32x32.jpg"" border=0></A></TD>
<TD vAlign=top align=right width=4><A href=""http://www.dellcommunity.com"" target=popup><IMG height=17 alt="""" src=""http://i.dell.com/images/global/brand/ui/secondary.gif"" width=4 border=0></A></TD>
<TD vAlign=top width=""100%""><A class=lnk id="""" href=""http://www.dellcommunity.com"" target=popup>Talk with other Customers in the Forum</A></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD><IMG height=4 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1></TD></TR>
<TR>
<TD><IMG height=4 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1></TD></TR>
<TR>
<TD vAlign=top>
<TABLE height=22 cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR class=rowsolid>
<TD class=fragsolid width=""100%"">
<H2 class=titlestylesolid>My Account</H2></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD vAlign=top width=181>
<FORM onkeypress=javascript:onKeyPress(this); style=""PADDING-RIGHT: 0px; PADDING-LEFT: 0px; PADDING-BOTTOM: 0px; MARGIN: 0px; PADDING-TOP: 0px"" name=frmMyAccountLogin action=https://supportapj.dell.com/support/supportrequests/apj/create.aspx?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd method=post><INPUT type=hidden value=http:// name=ModalLoginProtocol><INPUT type=hidden value=true name=Login><INPUT type=hidden value=http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&amp;c=in&amp;l=en name=ReferrerURL>
<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR>
<TD class=title_emph colSpan=2>Please login to create a Support Request</TD></TR>
<TR>
<TD><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD colSpan=2><SPAN class=para>E-mail Address:</SPAN><BR><INPUT onkeypress=""if (event.keyCode==13) this.form.submit();"" name=email></TD></TR>
<TR>
<TD><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD colSpan=2><SPAN class=para>Password:</SPAN><BR><INPUT onkeypress=""if (event.keyCode==13) this.form.submit();"" type=password value="""" name=password><BR><A href=""/support/topics/topic.aspx/ap/shared/support/personalize/en/emailpassword?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><SPAN class=para_small>Forgot Password?</SPAN></A></TD></TR>
<TR>
<TD><IMG height=10 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=2 border=0>
<TBODY>
<TR>
<TD vAlign=top width=17><IMG height=17 alt="""" src=""http://i.dell.com/images/global/brand/ui/primary.gif"" width=21 border=0></TD>
<TD vAlign=center align=left><A class=lnk id=ctl16 href=""javascript:window.document.frmMyAccountLogin.submit();"">Sign In</A></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=""100%"" border=0>
<TBODY>
<TR>
<TD>
<HR align=left width=""100%"" color=#aaaaaa noShade SIZE=1>
</TD></TR>
<TR>
<TD><IMG height=3 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD class=title_emph>Don't have an account?</TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=2 border=0>
<TBODY>
<TR>
<TD><A class=lnk href=""/support/topics/topic.aspx/ap/shared/support/personalize/en/register?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd""><IMG src=""http://i.dell.com/images/global/brand/ui/secondary.gif"" border=0></A></TD>
<TD vAlign=center><A class=lnk href=""/support/topics/topic.aspx/ap/shared/support/personalize/en/register?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Register &amp; Personalize</A></TD></TR></TBODY></TABLE></FORM>
<DIV></DIV></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></DIV><!-- content_end-->
<SCRIPT language=javascript>writeFooterBegin();</SCRIPT>

<DIV style=""WIDTH: 100%; PADDING-TOP: 10px"">
<TABLE style=""BORDER-TOP: #999999 1px outset; PADDING-BOTTOM: 4px; VERTICAL-ALIGN: middle; PADDING-TOP: 4px; BORDER-BOTTOM: #999999 1px inset"" height=25 cellSpacing=0 width=""100%"" border=0 cellpading=""0"">
<TBODY>
<TR>
<TD style=""PADDING-LEFT: 15px"">
<DIV class=para_crumb_43><SPAN style=""FONT-WEIGHT: bold"">You are here:&nbsp;</SPAN><A class=lnk_crumb43 href=""http://www1.us.dell.com/content/default.aspx?c=in&amp;l=en&amp;s=bsd&amp;~ck=bt"">Dell India</A>&nbsp;&gt;&nbsp;<A class=lnk_crumb43 href=""/support/index.aspx?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd&amp;~ck=bt"">Support Home Page</A></DIV></TD>
<TD noWrap align=right></TD></TR></TBODY></TABLE></DIV>
<DIV class=para_small id=footer style=""PADDING-RIGHT: 20px; PADDING-LEFT: 20px; PADDING-BOTTOM: 5px; PADDING-TOP: 15px; BACKGROUND-COLOR: white; TEXT-ALIGN: left""></DIV>
<TABLE style=""PADDING-LEFT: 10px"" cellSpacing=0 cellPadding=0 width=""100%"" bgColor=#ededed border=0>
<TBODY>
<TR>
<TD colSpan=2><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD vAlign=top align=middle width=""100%"">
<P class=para_small>All rights reserved : <A id="""" href=""http://www1.ap.dell.com/content/topics/global.aspx/corp/en/home?c=in&amp;cs=inbsd1&amp;l=en&amp;s=corp"" target=popup_window1>About Dell</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/use?c=in&amp;cs=inbsd1&amp;l=en&amp;s=gen"" target=popup_window1>Site Terms</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/terms_ss?c=in&amp;cs=inbsd1&amp;l=en&amp;s=gen"" target=popup_window1>Terms and Conditions</A> | <A id="""" href=""/support/topics/topic.aspx/ap/shared/support/dellcare/en/outstanding_issues?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Unresolved Issues</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/policy/en/privacy?c=in&amp;cs=inbsd1&amp;l=en&amp;s=gen"" target=popup_window1>Privacy</A> | <A id="""" href=""http://www1.ap.dell.com/content/topics/topic.aspx/ap/topics/main/en/sitemap?c=in&amp;cs=inbsd1&amp;l=en&amp;s=bsd"">Site Map</A> | <A class=oplabs href=""javascript:doOpionlabs();O_LC();"">Feedback</A></P>
<SCRIPT language=JavaScript type=text/javascript>
            document.write('<sc'+'ript');
            document.write(' type=""text/javascript""');
            document.write(' language=""JavaScript""');
            document.write(' src=""'+m_imgPfx+'/images/global/js/s_code_dell.js'+'"">');
            document.write('</sc'+'ript>');
            </SCRIPT>

<SCRIPT language=JavaScript src=""http://i.dell.com/images/global/js/s_code_dell.js"" type=text/javascript></SCRIPT>

<SCRIPT language=JavaScript type=text/javascript>
            s_dell.pageName="""";
            var s_code=s_dell.t();if(s_code)document.write(s_code);
            </SCRIPT>
</TD>
<TD>
<TABLE>
<TBODY>
<TR>
<TD vAlign=center><IMG height=4 alt="""" src=""http://i.dell.com/images/global/brand/ui/arrow_top.gif"" width=7 border=0></TD>
<TD style=""PADDING-RIGHT: 6px"" vAlign=center><A href=""#mastheadtop""><SPAN class=para>Top</SPAN></A></TD></TR></TBODY></TABLE></TD></TR>
<TR>
<TD colSpan=2><IMG height=5 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR>
<TR>
<TD bgColor=#cdcdcd colSpan=2><IMG height=1 alt="""" src=""http://i.dell.com/images/global/general/spacer.gif"" width=1 border=0></TD></TR></TBODY></TABLE>
<SCRIPT language=JavaScript type=text/javascript>
m_pzationPageHash="""";
</SCRIPT>
<FONT color=#ffffff>sn WEB3</FONT></TD></TR></TBODY></TABLE></TD></TR></TABLE>
<SCRIPT language=JavaScript>
sReady();
</SCRIPT>"
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21896776
Nice, so we are nearly there......the 2000630.....number is the case ref.....you can manually shorten those cells I suppose....

I'm surprised we got this far, to be honest, but there you go!

I forgot to mention too...any row that has something in column W will NOT be processed again.

Try this to see if it gets that number only....

Rob.
Set objIE = CreateObject("InternetExplorer.Application")

objIE.Visible = True

objIE.Navigate "about:blank"

While objIE.ReadyState <> 4

	WScript.Sleep 100

Wend

 

strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"

 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)

 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then

 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)

 

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.busy = True

			WScript.Sleep 100

		Wend

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

			objIE.document.frames.execScript "window.document.formEmailDell.submit();", "JavaScript"

			

			'strOuterText = objIE.document.documentElement.outerHTML

			'Set objFSO = CreateObject("Scripting.FileSystemObject")

			'Set objPage = objFSO.CreateTextFile("OuterText.html", True)

			'objPage.Write strOuterText

			'objPage.Close

			'Set objPage = Nothing
 

			While objIE.busy = True

				WScript.Sleep 100

			Wend

			While objIE.ReadyState <> 4

				WScript.Sleep 100

			Wend

			intCaseNumPos = InStr(LCase(objIE.document.body.innerHTML), "case number: <b>")

			strCaseNum = "Unknown"

			If intCaseNumPos > 0 Then

				intCaseNumPos = intCaseNumPos + 16

				strCaseNum = Mid(objIE.document.body.innerHTML, intCaseNumPos)

				strCaseNum = Left(strCaseNum, InStr(strCaseNum, "<") - 1)

			End If

			objSheet.Cells(intRow, "W").Value = strCaseNum

			

		End If

	End If

Next

 

MsgBox "Done"

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21896805
Rob i get this
2.00806E+16
When double click i get the format right...
But the actual call no that was on the screen and the mail i received was this
20080630002857571
But when double click the cell i get this
20080630002857500

I tried with 2 call and both had the same issue.

the 2nd call no is this in excel
20080630003210400
but the mail and the final ie summary was this
20080630003210457
0
 
LVL 11

Author Comment

by:bsharath
ID: 21896806
Rob i get this
2.00806E+16
When double click i get the format right...
But the actual call no that was on the screen and the mail i received was this
20080630002857571
But when double click the cell i get this
20080630002857500

I tried with 2 call and both had the same issue.

the 2nd call no is this in excel
20080630003210400
but the mail and the final ie summary was this
20080630003210457
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 21896836
Oh yeah, Excel with it's long number truncation.....
You can probably get around that by putting an apostrophe in front of the number, which this version also does...

Rob.
Set objIE = CreateObject("InternetExplorer.Application")

objIE.Visible = True

objIE.Navigate "about:blank"

While objIE.ReadyState <> 4

	WScript.Sleep 100

Wend

 

strExcelFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & "Support_Details.xls"

 

Set objExcel = CreateObject("Excel.Application")

Const xlUp = -4162

objExcel.Visible = True

Set objWB = objExcel.Workbooks.Open(strExcelFile, False, False)

Set objSheet = objWB.Sheets(1)

 

For intRow = 2 To objSheet.Cells(65536, "A").End(xlUp).Row

	' First, only do the procedure if the current case does not have a case number

	If Trim(objSheet.Cells(intRow, "W").Value) = "" Then

 

		strSerial = Trim(objSheet.Cells(intRow, "A").Value)

 

		strURL = "http://support.ap.dell.com/support/supportrequests/apj/create.aspx?request=true&c=in&l=en"

		objIE.Navigate strURL

		While objIE.busy = True

			WScript.Sleep 100

		Wend

		While objIE.ReadyState <> 4

			WScript.Sleep 100

		Wend

		objIE.document.all.frmServiceTagSelect.ServiceTag.Value = strSerial

		objIE.document.frames.execScript "checkChatAvailability()", "JavaScript"

		On Error Resume Next

		While InStr(objIE.document.body.innerHTML, "System Summary") = 0 And InStr(objIE.document.body.innerHTML, "Out of Warranty Issue") = 0

			WScript.Sleep 100

		Wend

		Err.Clear

		On Error GoTo 0

		If objIE.Document.Title = "Out of Warranty Issue" Then

			MsgBox strSerial & " is out of warranty."

			objSheet.Cells(intRow, "W").Value = "OUT OF WARRANTY"

		Else

		

			strProblemType = Trim(objSheet.Cells(intRow, "B").Value)

			strOperatingSystem = Trim(objSheet.Cells(intRow, "C").Value)

			strSkills = Trim(objSheet.Cells(intRow, "D").Value)

			strErrorDescription = Trim(objSheet.Cells(intRow, "E").Value)

			strProblemDescription = Trim(objSheet.Cells(intRow, "F").Value)

			strStepsDescription = Trim(objSheet.Cells(intRow, "G").Value)

			strFirstName = Trim(objSheet.Cells(intRow, "H").Value)

			strLastName = Trim(objSheet.Cells(intRow, "I").Value)

			strEmail1 = Trim(objSheet.Cells(intRow, "J").Value)

			strEmail2 = Trim(objSheet.Cells(intRow, "K").Value)

			strCompany = Trim(objSheet.Cells(intRow, "L").Value)

			strCurrentPh = Trim(objSheet.Cells(intRow, "M").Value)

			strAltPh = Trim(objSheet.Cells(intRow, "N").Value)

			strAddress1 = Trim(objSheet.Cells(intRow, "O").Value)

			strAddress2 = Trim(objSheet.Cells(intRow, "P").Value)

			strCountry = Trim(objSheet.Cells(intRow, "Q").Value)

			strCity = Trim(objSheet.Cells(intRow, "R").Value)

			strState = Trim(objSheet.Cells(intRow, "S").Value)

			strZipCode = Trim(objSheet.Cells(intRow, "T").Value)

			strAdditionalInstructions = Trim(objSheet.Cells(intRow, "U").Value)

			strEmailCopy = Trim(objSheet.Cells(intRow, "V").Value)

			

			'MsgBox "Filling in the form for " & strSerial

			objIE.document.all.formEmailDell.ProblemType.Value = strProblemType

			objIE.document.all.formEmailDell.OperatingSystem.Value = strOperatingSystem

			If strSkills = "Beginner" Then

				objIE.document.all.formEmailDell.ComputerSkills(0).Click

			ElseIf strSkills = "Intermediate" Then

				objIE.document.all.formEmailDell.ComputerSkills(1).Click

			ElseIf strSkills = "Advanced" Then

				objIE.document.all.formEmailDell.ComputerSkills(2).Click

			End If

			objIE.document.all.formEmailDell.ErrorDescription.Value = strErrorDescription

			objIE.document.all.formEmailDell.ProblemDescription.Value = strProblemDescription

			objIE.document.all.formEmailDell.StepsDescription.Value = strStepsDescription

			objIE.document.all.formEmailDell.EmailTechSupport_FirstName.Value = strFirstName

			objIE.document.all.formEmailDell.EmailTechSupport_LastName.Value = strLastName

			objIE.document.all.formEmailDell.EmailTechSupport_EMailAddress.Value = strEmail1

			objIE.document.all.formEmailDell.BackContactEmail.Value = strEmail2

			objIE.document.all.formEmailDell.PrimaryContactCompany.Value = strCompany

			objIE.document.all.formEmailDell.PrimaryContactPhone.Value = strCurrentPh

			objIE.document.all.formEmailDell.BackContactPhone.Value = strAltPh

			objIE.document.all.formEmailDell.PrimaryContactAddress1.Value = strAddress1

			objIE.document.all.formEmailDell.PrimaryContactAddress2.Value = strAddress2

			Select Case strCounty

				Case "Australia"

					strCountry = "au"

				Case "China"

					strCountry = "cn"

				Case "Hong Kong"

					strCountry = "hk"

				Case "India"

					strCountry = "in"

				Case "Korea"

					strCountry = "kr"

				Case "Malaysia"

					strCountry = "my"

				Case "New Zealand"

					strCountry = "nz"

				Case "Singapore"

					strCountry = "sg"

				Case "Taiwan"

					strCountry = "tw"

				Case "Thailand"

					strCountry = "th"

				Case Else

					strCountry = ""

			End Select

			If strCountry <> "" Then objIE.document.all.formEmailDell.countryselector.Value = strCountry

			objIE.document.all.formEmailDell.PrimaryContactCity.Value = strCity

			objIE.document.all.formEmailDell.PrimaryContactState.Value = strState

			objIE.document.all.formEmailDell.PrimaryContactZipcode1.Value = strZipCode

			objIE.document.all.formEmailDell.PrimaryContactInstructions.Value = strAdditionalInstructions

			If strEmailCopy = "Yes" Then objIE.document.all.formEmailDell.PrimaryEmailcopy.Click

			'objIE.document.frames.execScript "Returnvalid()", "JavaScript"

			objIE.document.frames.execScript "window.document.formEmailDell.submit();", "JavaScript"

			

			'strOuterText = objIE.document.documentElement.outerHTML

			'Set objFSO = CreateObject("Scripting.FileSystemObject")

			'Set objPage = objFSO.CreateTextFile("OuterText.html", True)

			'objPage.Write strOuterText

			'objPage.Close

			'Set objPage = Nothing
 

			While objIE.busy = True

				WScript.Sleep 100

			Wend

			While objIE.ReadyState <> 4

				WScript.Sleep 100

			Wend

			intCaseNumPos = InStr(LCase(objIE.document.body.innerHTML), "case number: <b>")

			strCaseNum = "Unknown"

			If intCaseNumPos > 0 Then

				intCaseNumPos = intCaseNumPos + 16

				strCaseNum = Mid(objIE.document.body.innerHTML, intCaseNumPos)

				strCaseNum = Left(strCaseNum, InStr(strCaseNum, "<") - 1)

			End If

			If strCaseNum <> "Unknown" Then strCaseNum = "'" & strCaseNum

			objSheet.Cells(intRow, "W").Value = strCaseNum

			

		End If

	End If

Next

 

MsgBox "Done"

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21896865
Thanks Rob worked perfect...

This is going to be sooooo useful to many like me....

Thanks a lot Rob....

Any help with the other post?
0
 
LVL 11

Author Comment

by:bsharath
ID: 21913184
Rob need urgent help on this post please
Out of ideas on what the problem could be...Any help is of great use....
2 msi file deployment through GPO
http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_23532372.html
0
 
LVL 11

Author Comment

by:bsharath
ID: 21922718
0
 
LVL 11

Author Comment

by:bsharath
ID: 21942610
0
 
LVL 11

Author Comment

by:bsharath
ID: 22013176
Hi Rob Good Morning...
Any help with my posts... :-)
0
 
LVL 11

Author Comment

by:bsharath
ID: 22066081
Hi Rob how are you...Long time no see...
I have this post . Can you pleaseeee. Help...
 http://www.experts-exchange.com/Programming/Languages/Q_23587389.html
0
 
LVL 11

Author Comment

by:bsharath
ID: 22384242
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
This article will show, step by step, how to integrate R code into a R Sweave document
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now