+ Reply to Thread
Results 1 to 7 of 7

Read, copy and paste from a exported pdf to excel

  1. #1
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    285

    Read, copy and paste from a exported pdf to excel

    Hi People,

    I would like to ask you if I it is possible to create this magic with VBA. I have exported to excel a pdf. Now I need to run a macro that can look for certain information and paste to another sheet.

    Since I do not know how to start my code, that is why I came here to learn.

    Attached you can find my file with source and target.
    Attached Files Attached Files

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Read, copy and paste from a exported pdf to excel

    Try this:

    Please Login or Register  to view this content.
    Directions for running the routine(s) just supplied

    If you haven't used macros before you'll need to go to:
    File- options - trust center -trust center settings - macro settings ,
    the second option down (disable all macros with notification)

    Then - Copy the code to the clipboard

    Open your Workbook

    Press ALT + F11 to open the Visual Basic Editor.

    Select "Module" from the Insert menu

    Type "Option Explicit" then paste the code under it

    With the cursor between Sub and End Sub press F5 (F8 to Single Step)

    OR

    Press ALT + Q to close the code window.

    Press ALT + F8 then double click on the macro name
    *Be sure to save the book with the code as Macro-Enabled
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    285

    Re: Read, copy and paste from a exported pdf to excel

    Hi Xladept,

    Thank you for the quick reply. I was able to replicate your instructions however the macro just added another sheet and put INVOICE in A1.
    As you can see in the workboob in tab SOURCE I highlighted in yellow what I want to copy and paste in tab TARGET. Could you do something?

    Thank you in advance.

  4. #4
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Read, copy and paste from a exported pdf to excel

    This will get you one at a time, is that what you want?
    If you want to stop it just hit enter.

    Please Login or Register  to view this content.
    Last edited by xladept; 10-13-2017 at 07:52 PM.

  5. #5
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    285

    Re: Read, copy and paste from a exported pdf to excel

    I need to import from SOURCE the Invoice Number, date, container numbers, Item numbers, prices, BOL, and some other information and paste them to TARGET sheet to last row.

    This code actually is asking me for a Invoice Number which actually I would not want to type for any risk of typos.

    Did you open up the file?

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Read, copy and paste from a exported pdf to excel

    For one thing your sample didn't have source and target - do you want to just copy the source to the target? What are you wanting to do?

    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  7. #7
    Forum Contributor
    Join Date
    03-14-2015
    Location
    Mexico
    MS-Off Ver
    365
    Posts
    285

    Re: Read, copy and paste from a exported pdf to excel

    Hi, please find attached the two file, hopefully you have something that can help me.

    Thanks,
    Fabian
    Attached Files Attached Files

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro to read a cell for the location to goto, copy, and then paste elsewhere
    By Kfrayne in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-30-2017, 03:45 PM
  2. [SOLVED] Read, copy, paste
    By jericho14444 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-04-2013, 01:38 PM
  3. excel can't read exported excel file
    By carsto in forum Excel General
    Replies: 3
    Last Post: 08-12-2011, 02:51 PM
  4. Replies: 1
    Last Post: 04-07-2011, 01:21 AM
  5. Replies: 0
    Last Post: 05-20-2009, 05:37 AM
  6. Read row number from a cell and copy /paste
    By modytrane in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-03-2008, 09:33 AM
  7. [SOLVED] copy/paste words in cell can't be read on screen
    By MO in forum Excel General
    Replies: 2
    Last Post: 04-28-2006, 10:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1