Using VBA to Fill PDF Form

cbkinse

New Member
Joined
Feb 28, 2022
Messages
1
Office Version
  1. 2016
Platform
  1. Windows
I am trying to use VBA to fill a PDF Form with Excel data. I have tried watching videos on YouTube and I am struggling with getting the syntax correct. This is the Sub that I cant get to work right now.

Sub CreatePDForms()
Dim PDFTemplateFile, NewPDFName, SavePDFFolder, LastName As String
Dim API As String
Dim APIRow, LastRow As Long
With Sheet1
LastRow = .Range("A9999").End(xlUp).Row 'Last Row
PDFTemplateFile = .Range("C3").Value 'Template File Name
SavePDFFolder = .Range("G20").Value 'Save PDF Folder
OPENURL "" & PDFTemplateFile & "", Show_Maximized
Application.Wait Now + 0.00006

can you tell me where I am going wrong?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!

Forum statistics

Threads
1,223,275
Messages
6,171,121
Members
452,381
Latest member
Nova88

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top