Export Records to PDF File (1 Viewer)

JPR

Registered User.
Local time
Today, 16:22
Joined
Jan 23, 2009
Messages
192
Hello,
I have been exporting date from a form to MS Word with no problem, using bookmarks in the word file and appropriate VBA:

On Error Resume Next
Dim objWord As Object
Dim strPath As String
strPath = DLookup("[TemplateLocation]", "TablePath", "[TemplateID]='" & Me.[TXTPATH] & "'")

Set objWord = CreateObject("Word.Application")
objWord.Visible = False

objWord.Documents.ADD strPath

objWord.ActiveDocument.Bookmarks("LNAME").Select
objWord.Selection.Text = Me.LNAME

strSavePath = DLookup("[TemplateLocation]", "TablePath", "[TemplateID]='WordSavePath'")

objWord.ActiveDocument.SaveAs strSavePath & Me![LName] & " " & Me.[FNAME] & "-" & Me.[TEMPLATEID] & " " & Right([FileNo], 4) & ".doc"
objWord.Quit
MsgBox "Form " & [TEMPLATEID] & " for " & [LNAME] & " " & [FNAME] & " - FILENO " & [FILENO] & " - has been saved in MAINFOLDER folder.", vbOKOnly, "Form Save"


I was wandering if this is also possible with PDF Files. I have a PDF file with fields I have created but do not know where to start.

Appreciate any help. Thank you
 

theDBguy

I’m here to help
Staff member
Local time
Today, 16:22
Joined
Oct 29, 2018
Messages
21,358
Hi. I show two ways of doing this on my website. One requires Acrobat, and one doesn't.
 

Users who are viewing this thread

Top Bottom