set olApp=createObject("Outlook.Application")
set olns=olApp.GetNameSpace("MAPI")
set objFolder=olns.GetDefaultFolder(6)
for each item1 in objFolder.items
if item1.unread then
msgbox item1.subject
msgbox item1.body
end if
next
LocalFilePath = "C:\Updated_Files_Form_QC_TillDate"
Set QCConnection = QCUtil.QCConnection
Set treeManager = QCConnection.TreeManager
'Specify the Quality Center path to the desired folder
QC_Path ="Subject\Automation\Regression\Library"
Set node = treeManager.nodebypath(QC_Path)
set stratt = node.attachments
For Each obj_QCAttachment In stratt.NewList("")
Set obj_QCAttachmentStorage = obj_QCAttachment.AttachmentStorage
obj_QCAttachmentStorage.ClientPath = LocalFilePath 'give the directory where u want to save the file
obj_QCAttachmentStorage.Load obj_QCAttachment.Name,True
Next
str="FindLength"
'Here you need to add one single character which is not existed in your string
str=FindLengthr"
'here i had added one character "r" in the last of the string
msgbox instr(1,str,"r",1)-1
OtherWay:
str="VBSCRIPTING"
i=1
do
str1=mid(str,i,1)
if str1<>"" then
i=i+1
else
exit do
end if
loop until str1=""
msgbox i-1
Set xl=CreateObject("Excel.Application")
xl.Workbooks.Open "C:\Test.xlsx"
Set r = xl.Range("A1:N20").Find("kamesh")
If r Is Nothing Then
xl.Cells(1,1).Value= "not found"
Else
xl.Cells(1,1).Value= "found"
End If
xl.quit
set xl=nothing