Find an highlight text with Excel vba an Acobat XI Pro

Hello,
i want to write a VBA Script to search for and highlight text.
Until now my Script open the PDF and search for text. But how can i highlight it ?
Thank you.
Axel
My Code :
Sub OpenPDFPageView()
    Dim PDFApp As AcroApp
    Dim PDFDoc As AcroAVDoc
    Dim PDFPageView As AcroAvPageView
    Dim PDFPath As String
    Dim DisplayPage As Integer
    PDFPath = "C:\Users\info_000\Desktop\test.pdf"
    'Set the page you want to be displayed
    DisplayPage = 1
    'Initialize Acrobat by creating App object
    Set PDFApp = CreateObject("AcroExch.App")
    'Set AVDoc object
    Set PDFDoc = CreateObject("AcroExch.AVDoc")
    'Open the PDF
    If PDFDoc.Open(PDFPath, "") = True Then
        PDFDoc.BringToFront
        'Maximize the document
        Call PDFDoc.Maximize(True)
        Set PDFPageView = PDFDoc.GetAVPageView()
        'Go to the desired page
        'The first page is 0
        Call PDFPageView.GoTo(DisplayPage - 1)
        'Set the page view of the pdf
        Call PDFPageView.ZoomTo(2, 50)
    End If
    If PDFDoc.FindText("blabla", 1, 1, 1) = True Then
        Debug.Print "gefunden"
        call pdfdoc.
    Else
        Debug.Print "nicht gefunden"
    End If
    Set PDFApp = Nothing
    Set PDFDoc = Nothing
    On Error Resume Next
    'Show the adobe application
    PDFApp.Show
    'Set the focus to adobe acrobat pro
    AppActivate "Adobe Acrobat Pro"
End Sub

With Acrobat Javascript you can search for words, retrieve the position of the found words, and add annotations at this positions.

Similar Messages

  • Why can I now highlight text with mouse pointer in Adobe Reader 9

    I just downloaded Adobe Reader X. I think I prefer Reader 9. I don't like being able to click in the document and have a flashing place mark (right terminology?) there. This is now happening in the Reader 9 version too, and I can copy text this way, but I don't want this. I didn't change any preferences. Can anyone help?

    Like I said, I didn't change any of the preferences, so I don't know why this happened. I think it only happened after I opened Adobe Reader X. I see no options in preferences for turning on or off the ability to highlight text with your mouse pointer, and I thought you were not supposed to be able to do this in Adobe Reader 9.

  • Daq with excel vba

    Hello,
    I'm working with Excel VBA and I have a 6024E card. I'd like to know where I can download the CW DAQ 3.0.1 and if there is a documentation describing the functionality of the CW DAQ.
    With kind regards
    Alexander Heß 

    Hello Alex,
    you are able to use 3 different drivers for the device.
    DAQmx,Traditional DAQ or DAQmx Base.
    I didnt found any 3.0.1 version.
    Only a 3.1 version of the DAQmx Base driver.
    http://joule.ni.com/nidu/cds/view/p/id/970/lang/de
    Here a link to the DAQcard overview with the latest driver software: http://zone.ni.com/devzone/cda/tut/p/id/6910#eseries
    Kind regards,
    Elmar

  • How to highlight text with Adobe Reader XI?

    email [email protected]

    Thanks. The PDF file was made from a web site article and I guess this is the same as scanned as I cannot highlight.  The cursor changes but cannot highlight what I want.
    I was able to add text and I did this in Red and will ask the VA to read under the sections marked in Red.
    Thanks,
    Vernon Pobanz
          From: ~graffiti <[email protected]>
    To: vernon pobang <[email protected]>
    Sent: Tuesday, October 7, 2014 11:57 AM
    Subject:  How to highlight text with Adobe Reader XI?
    How to highlight text with Adobe Reader XI?
    created by ~graffiti in Adobe Reader - View the full discussionUse the highlight tool under Comment>Annotations. This will only work if the pdf isn't a scanned image. If that is the case, there is no text to highlight. Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6800192#6800192 Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:  To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.  Start a new discussion in Adobe Reader by email or at Adobe Community For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How to find and replace text in Excel with Automator

    I am new to Automator. And I would like some help how I can create a service that will allow me to find and replace certain text in Excel. I noticed that there is an action to do this for Word documents, but not for Excel document.
    Any suggestions how I can do this?
    Thanks so much for your help.

    Easiest way to do it is the following:
    - Open the PDF file in Acrobat.
    - Go to Tools - Forms - More Form Options - Export Data.
    - Save the form data as an XML file somewhere on your system.
    - Open XML the file in a plain-text editor (I recommend Notepad++).
    - Let's say you want to replace all the years in the dates from "2013" to "2014". Do a global Search&Replace of "2013-" to "2014-" (I added the dash just to make sure that only date fields are edited).
    - Save the XML file (maybe under a new name).
    - Go back to the PDF file, and now go to Tools - Forms - More Form Options - Import Data.
    - Select the edited XML file and import it.
    - Done!

  • Getting clusters from LabVIEW ActiveX Server with Excel/VBA

    Hello,
    my colleague and I are trying to control a LV from Excel (VBA) by ActiveX.
    I.E.:
    We do something like :
    Set LV = createObject("LabVIEW.Application")
    Set VI = LV.GetVIReference("Path_to_VI")
    ParamNames(0) = "Input1"
    ParamNames(1) = "Input2"
    ParamNames(2) = "Output"
    ParamValues(0) = 1
    ParamValues(1) = 3.1415
    Call VI.Call(ParamNames,ParamValues)
    msgbox("output =" & ParamVals(2))
    This works perfectly for simple data types (int, double, float, string, etc )
    Now we need to transfer more complex structures, which are originaly LV-clusters.
    But we did not find any clue on how do that (especially receive clusters) in the help or on the internet.
    Is there any chance to succeed ???
    TIA,
    Thomas

    Actually, working with clusters is really really easy. Through the magic of - well something - a cluster in LV comes out in the VBA environment as an array of variants. There was an activex example that shipped with V7.1 that showed this very thing. I couldn't find them in V8 so here is the 7.1 stuff.
    Check out the macros in the Excel spreadsheet... This show running the VI in the development environment, but if this looks interesting I can fill you in on how to make it work in an executable.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps
    Attachments:
    freqresp.xls ‏49 KB
    Frequency Response.llb ‏155 KB

  • How do I know if my mouse is bad?  I'm having trouble highlighting text with my mouse, model A1152

    How do I know if my mouse needs to be replaced or if it something else?  I am having increasing trouble highlighting text, it either won't hold the highlighting, or it won't highlight . . . making it impossible to create a link in my emails, to delete text, or copy and paste.
    I have an iMac that is about 4 years old and the mouse that came with it uses a USB port to connect.
    Thanks for any information or suggestions.

    Is it one of those with a little moving/rotating ball on the bottom of it? Have you ever taken that out and cleaned it and the area holding it? It could be dust/dirt in there. I always used a QTip slightly moistened with alcohol.

  • How to highlight text with a translucent color

    I have to highlight text from a JTextArea, but the color is too dark... So I'd like to highlight with a translucent color. How can I do it ?
    Here is my code :
    JTextArea jt;
    int beginSelect;
    int endSelect;
    Highlighter hl = jt.getHighlighter();
    DefaultHighlighter.DefaultHighlightPainter hld = new DefaultHighlighter.DefaultHighlightPainter(Color.BLUE);
    try {
    hl.addHighlight(beginSelect, endSelect, hld);
    catch (BadLocationException e) {}
    Thank you.

    import javax.swing.plaf.*;
            Color color = new Color(220, 200, 240, 150);
            ColorUIResource colorResource = new ColorUIResource(color);
            UIManager.put("TextArea.selectionBackground", colorResource);Default for windows is [r=49, g=106, b=197]
    and for metal is [r=204, g=204, b=255].

  • Vim keeps freezing and I cannot highlight text with my mouse

    title says it all.  Vim will freeze on me randomly.  I was having X issues earlier but stopped using the nvidia driver and that seemed to fix that, but now Vim freezes.  I'll be in Insert mode and it simply will not accept any of my keystrokes or attempts to esc to command mode.
    Eventually it'll unfreeze and then process all the keys I pressed while it was frozen (about 1-2 minutes later).
    The only thing going on in my .vimrc is a color scheme.  This happens in urxvt, in an ssh shell, and in screen.   
    And for some reason I can't used my mouse to highlight text in vim either in all the shells previously listed.

    Try resetting the SMC and PRAM.
    Barry

  • How do I reliably select text or highlight text with t440s trackpad?

    It's astounding to me that you remove so many buttons that most users rely on regularly, and then don't provide any obvious instructions or tutorials on how to use all this functionality.
    So I'm trying to do something incredibly simply with buttons -- select some text to copy or paste or cut. I'm using Windows 7 on a t440s.
    Apparently the only way to do this -- unreliably -- is to hold the trackpad down (press it all the way in -- not easy to do with one finger!), and try and get the whole thing you need to select in one swoop. If you've mis-positioned your finger on the trackpad to begin the operation, though, you'll run out of space before you get to the edge of the trackpad. And then you need to start over. And keep trying to do it, until you get it.
    So now an incredibly simple action I did a dozen times a day before the t440s has become nearly impossible. The 3 times I've tried to do it so far, it's taken me a half dozen times each time. It's not gotten easier.
    Which makes me believe I'm missing something here...
    So what's the easiest way to select some text on a page, and quickly copy it?
    If I get find a simple way to do this, sadly, this laptop might be going back. I can't believe this trend to remove the trackpad buttons amongst manufacturers. If I wanted to buy a Mac, I would've bought a Mac.

    You can start by selecting a small portion of text, then release the clickpad, then hold down a Shift key and single-click at the end of the text to be selected -- the selection will expand to encompass the whole text segment ending at your last click.
    If you prefer tapping to clicking, in most apps you can start by double-tapping on a word (word gets selected) then use Shift in the same way as above, ending with a single-tap.

  • Firefox 27.0.1 no longer highlights text with a dark background when copy and pasting. IT emboldens it, but is hard to see. It will paste??

    When I try to copy and paste it no longer highlights section I am trying to highlight with mouse. I did finally see it emboldens the text (just barely - not easy to see). Sometimes, when I paste into a search panel (for instance) then the section I "highlighted" does have a grey background and it pastes into the panel. Does not work every time, but is only showing up after I click in search window.
    This has only shown up the last few days. I was updated right after 27.0.1 came out.
    I will mention I have seen an unusual view of the browser's menu area turning dark (if I hovered over area the menus showed up?) This h append 4-5 times and went away?
    Vista Home Premium

    You're welcome

  • Can I text with my iphone4 through my macbook pro

    Can I, somehow, read and send texts on my Macbook Pro as if I were sending them from my phone? (iPhone 4)

    According to Mac 101: iChat, no.

  • HELP-highlighting text in Word with Snow Leopard...

    I am on my MBP, working within a virtual course dealing w/ Word 2010.... within the coursework, I have to highlight text within the examples I'm working on, in order to move to the next step in the tutorial... I'm having a hard time getting the highlighting to work.... therefore, can't move on...
    Please help........
    thanks

    You can highlight text with the trackpad, see either this article
    http://support.apple.com/kb/HT3211
    or this one
    http://support.apple.com/kb/HT1115
    depending on which model you have.
    Basically you want to click once and hold while moving your finger across the trackpad to highlight the text. It's not easy at first for some people with these trackpads. You might find it helpful to simply purchase a low cost USB mouse for a few dollars, plug it in, and use it for these sorts of things.

  • Fill a PDF form via Excel (VBA) - Hide text box

    Hi,
    i already created a PDF form and also can fill the text boxes with Excel VBA.
    Now i'm about to hide some fields if they are empty, but i have no clue how to.
    My code to fill the fields is:
    Fields("Title").Value = Worksheets(TabName).Cells(actCell, 4).Value
    To hide a field the code should be similar, but i have no clue what statement i need to set.
    I already tried:
    Fields("Title").Visible = False
    Fields("Title").Hide
    Fields("Title").Hide = True
    What else can i type to hide and unhide the fields?
    Looking forward to hear from you.
    Thanks a lot.

    Does the form have a provision to insert images (e.g. a Browse button)?
    [topic moved to iOS subforum]

  • Acrobat Pro 9 - How To Get Sum of Highlighted Text

    I am trying to find the best way to add numbers from scanned documents. I would like to use the highligh feature to mark the numbers I am going to add up and get a total sum of those combined numbers as I go. Is there a way to do this?
    If not is there a way to take just the highlited areas and put them in a line by line so it would be easy to see  just the highlited text?
    Expamle Line by line:
    $1.50
    $2.50
    $11.95
    ect..
    Even better would be to have a line by line of the highlighted text with a sum.

    Lots of issues!
    A scanned page is just an image no text. So you need to OCR the document.
    "Highlight" is a comment and only the highlight annotation and has no content unless a comment text is added to the highlight. So just the highlight over an image or text knows nothing about what is covered but you could find its location.
    Acrobat knows only words and location of words on the page. So you would need to have a script to match the location of the highlight's location to a words location. You may need to adjust for rotation of pages.
    You then need to convert a text field with numbers as text to numbers.
    To display the number, you will need to dynamically add fields and the computed value or the formula to compute the value.
    All of this is just to much to cover in a single forum post.

Maybe you are looking for