haasupport.blogg.se

Excel symbols to search for text
Excel symbols to search for text





excel symbols to search for text

Set fldr = Application.FileDialog(msoFileDialogFolderPicker) MsgBox "Error " & Err & ": " & Error(Err) Set fd = Application.FileDialog(msoFileDialogFilePicker) If Dir(path) vbNullString Then FileExist = True If objjso.getPageNthWord(page, i + 1) = c.Offset(0, 2).Value Thenįunction FileExist(path As String) As Boolean If objjso.getPageNthWord(page, i) = c.Offset(0, 1).Value Then NewPDF.InsertPages -1, objPDDoc, page, 1, 0 Set newPDF = CreateObject("AcroExch.PDDoc") NewPDF.InsertPages lngPages, objPDDoc, page, 1, 0 Set newPDF = CreateObject("AcroExch.pdDoc") If FileExist(Folder & "\" & c.Offset(0, 4) & ".pdf") Then If objjso.getPageNthWord(page, i) = c.Value Then WordsCount = objjso.GetPageNumWords(page) 'AD.1 open file, if =false file is damageįor Each c In Sheets("Sheet1").Range("A2:A" & lastrow) Set objPDDoc = CreateObject("AcroExch.PDDoc")

excel symbols to search for text

Set objApp = CreateObject("AcroExch.App") Lastrow = Sheets("Sheet1").Cells(Rows.Count, "A").End(xlUp).Row

excel symbols to search for text

Is there a way to make the code faster? Currently it loops through each cell searches through each page looping through each word until it finds the word in the cell. The code works but is rather slow, I may need to search for as many as 200 words in a PDF which could be as long as 600 pages. I have the following code, which looks at each cell in column A of my spreadsheet, searches for the text it finds there in the specified PDF and then extracts the page where it finds the text as a PDF, naming it with the value in the cell of the spreadsheet.







Excel symbols to search for text