Tuesday, August 28, 2012
Friday, February 18, 2011
How To Extract Text From Images
[MS Office > MS Office Tools > MS Office Document Imaging]
and selecting [Tools > Options > OCR tab > OCR Language]
Now Select the text in image which are need to scrap out and right click. select any option which you want.
and selecting [Tools > Options > OCR tab > OCR Language]
Now Select the text in image which are need to scrap out and right click. select any option which you want.
Wednesday, January 12, 2011
File copy code using excel macro or VBA
Const cellfilename As String = "A"
Const celldesc As String = "B"
Public Sub doc()
Dim fso_w As New Scripting.FileSystemObject
Dim fso_r As New Scripting.FileSystemObject
Dim streamRead As TextStream
Dim strdesc, strHTML, strHTMLmain, strOther, str, strAO, strShip, strAdditionalShip, strTempdesc As String
Dim strShippingPackage, strweightlbs, strweightoz, strheight, strwidth As String
Dim i, intNoImage As Integer
Dim sDesktopPath As String
Set objWSHShell = CreateObject("WScript.Shell")
sDesktopPath = objWSHShell.SpecialFolders("Desktop")
intNoImage = 0
For i = 1 To 1 '17 To 116, 117 To 216, 217 to 716
'Do not create listings that do not have any images
strHTMLmain=””
Set b = fso_r.OpenTextFile(sDesktopPath + "\New Folder\doctorcloseout\eBayDescription\eBayDescription\" + Range(cellfilename & i).Value, ForReading)
strHTMLmain = b.ReadAll
Range(celldesc & i).Value = strHTMLmain
Next i
MsgBox "done!. No images= " + CStr(intNoImage)
End Sub
Const celldesc As String = "B"
Public Sub doc()
Dim fso_w As New Scripting.FileSystemObject
Dim fso_r As New Scripting.FileSystemObject
Dim streamRead As TextStream
Dim strdesc, strHTML, strHTMLmain, strOther, str, strAO, strShip, strAdditionalShip, strTempdesc As String
Dim strShippingPackage, strweightlbs, strweightoz, strheight, strwidth As String
Dim i, intNoImage As Integer
Dim sDesktopPath As String
Set objWSHShell = CreateObject("WScript.Shell")
sDesktopPath = objWSHShell.SpecialFolders("Desktop")
intNoImage = 0
For i = 1 To 1 '17 To 116, 117 To 216, 217 to 716
'Do not create listings that do not have any images
strHTMLmain=””
Set b = fso_r.OpenTextFile(sDesktopPath + "\New Folder\doctorcloseout\eBayDescription\eBayDescription\" + Range(cellfilename & i).Value, ForReading)
strHTMLmain = b.ReadAll
Range(celldesc & i).Value = strHTMLmain
Next i
MsgBox "done!. No images= " + CStr(intNoImage)
End Sub
To remove duplicate value in excel cols (VBA Code -Excel Macros)
Const strDATA As String = "F"
Public Sub Tl_Generic()
Dim strHTMLmain, strHTML As String
Dim i, j As Integer
For i = 1 To 6
strHTMLmain = Range(strDATA & i).Value
For j = 1 To 6
If (j <> i) Then
strHTML = Range(strDATA & j).Value
If (strHTML <> "") Then
If strHTMLmain = strHTML Then
'newFLAG = Range(newLIST & i).Value
Range(strDATA & i).Value = ""
End If
End If
End If
Next j
Next i
MsgBox "done!"
End Sub
Public Sub Tl_Generic()
Dim strHTMLmain, strHTML As String
Dim i, j As Integer
For i = 1 To 6
strHTMLmain = Range(strDATA & i).Value
For j = 1 To 6
If (j <> i) Then
strHTML = Range(strDATA & j).Value
If (strHTML <> "") Then
If strHTMLmain = strHTML Then
'newFLAG = Range(newLIST & i).Value
Range(strDATA & i).Value = ""
End If
End If
End If
Next j
Next i
MsgBox "done!"
End Sub
File rename (VBA Code -Excel Macros)
Sub DoRename()
Dim i As Integer
For i = 1 To 4
Name Range("A" & i).Value As Range("B" & i).Value
Next i
End Sub
Dim i As Integer
For i = 1 To 4
Name Range("A" & i).Value As Range("B" & i).Value
Next i
End Sub
To find the presence of bulk image in local path(VBA Code -Excel Macros)
Const strIMAGE As String = "D"
Const newFLAG As String = "E"
Public Sub Tl_Generic()
Dim i As Integer
For i = 3 To 13
If Dir("" \ Range(newFLAG & i).Value) <> "" Then
Range(newFLAG & i).Value = "present"
Else
Range(newFLAG & i).Value = "missing"
End If
Next i
End Sub
Const newFLAG As String = "E"
Public Sub Tl_Generic()
Dim i As Integer
For i = 3 To 13
If Dir("
Range(newFLAG & i).Value = "present"
Else
Range(newFLAG & i).Value = "missing"
End If
Next i
End Sub
To find duplicate element in excel cols (VBA Code -Excel Macros)
Const strDATA As String = "D"
Const newLIST As String = "E"
Public Sub Tl_Generic()
Dim strHTMLmain, strHTML, newFLAG As String
Dim i, j As Integer
For i = 3 To 13
Range(newLIST & i).Value = ""
strHTMLmain = Range(strDATA & i).Value
For j = 3 To 13
strHTML = Range(strDATA & j).Value
If strHTMLmain = strHTML Then
newFLAG = Range(newLIST & i).Value
Range(newLIST & i).Value = newFLAG & "-" & j
End If
Next j
Next i
MsgBox "done!"
End Sub
Const newLIST As String = "E"
Public Sub Tl_Generic()
Dim strHTMLmain, strHTML, newFLAG As String
Dim i, j As Integer
For i = 3 To 13
Range(newLIST & i).Value = ""
strHTMLmain = Range(strDATA & i).Value
For j = 3 To 13
strHTML = Range(strDATA & j).Value
If strHTMLmain = strHTML Then
newFLAG = Range(newLIST & i).Value
Range(newLIST & i).Value = newFLAG & "-" & j
End If
Next j
Next i
MsgBox "done!"
End Sub
Subscribe to:
Posts (Atom)

