+ Reply to Thread
Results 1 to 3 of 3

Using SendKeys Paste to autofill PDF forms doesn't copy line breaks

  1. #1
    Registered User
    Join Date
    07-17-2019
    Location
    London, England
    MS-Off Ver
    2010
    Posts
    27

    Using SendKeys Paste to autofill PDF forms doesn't copy line breaks

    Hello Everyone,

    I have a dataset that I would like to paste into a PDF form that I have made. I am building a module to eventually save the forms in a specified folder. I am using SendKeys function so that after opening the PDF file it tabs through the various fields and pastes the results. The dataset is large, circa 25000 items.

    I have had to use a copy paste function as below due to the length of the strings, however this means the line breaks aren't included and some of the data is almost unreadable.

    Please Login or Register  to view this content.
    I have tried using a replace function to change the Char(10) and Char(13) as well as other breaks to <br> to no avail - it simply prints <br> in the form.

    I've attached both the form and a heavily redacted dataset.

    Any help would be appreciated!
    Attached Files Attached Files

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Using SendKeys Paste to autofill PDF forms doesn't copy line breaks

    Hi, I haven't looked at you files yet, but have you considered coping the results you want into a temporary worksheet; format it as you would want to be when printed and then save this sheet as a PDF file? After that you can just delete the worksheet.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: Using SendKeys Paste to autofill PDF forms doesn't copy line breaks

    I did a quick Google search and came up with this ite, maybe there's something here
    https://www.excel-first.com/use-exce...f-form-fields/

+ 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. copy, ALT-Tab, Paste... SENDKEYS? APPACTIVATE?
    By Jeasy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-14-2019, 12:00 PM
  2. PasteSpecial causing RunTime error 1004 & autofill doesn't stop at last line
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 10-24-2014, 09:18 AM
  3. Paste without format, Copy without CR/LF, and better Sendkeys
    By onidarbe in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-29-2014, 08:29 PM
  4. VBA code to copy cell text with line breaks
    By darren.1981 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-28-2014, 04:26 AM
  5. [SOLVED] Copy / Paste issue using SendKeys
    By hawkingsright in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-12-2014, 04:54 PM
  6. Replies: 1
    Last Post: 03-18-2014, 06:57 PM
  7. Copy a cell with line breaks and keep format
    By mkalavitz in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-18-2005, 12:07 PM

Tags for this Thread

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