Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

:-) your own self. -- Larry Wall in <199709261754.KAA23761@wall.org>


devel / comp.databases.ms-access / pdDoc.Save 0, FileNm won't save!

SubjectAuthor
o pdDoc.Save 0, FileNm won't save!ABG Laura

1
pdDoc.Save 0, FileNm won't save!

<81772a0d-1442-4e72-933d-720548305492n@googlegroups.com>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=657&group=comp.databases.ms-access#657

  copy link   Newsgroups: comp.databases.ms-access
X-Received: by 2002:a05:622a:198b:b0:403:745e:33ce with SMTP id u11-20020a05622a198b00b00403745e33cemr907qtc.13.1691704314177;
Thu, 10 Aug 2023 14:51:54 -0700 (PDT)
X-Received: by 2002:a05:6a00:9a0:b0:67d:41a8:3e19 with SMTP id
u32-20020a056a0009a000b0067d41a83e19mr1536943pfg.3.1691704312990; Thu, 10 Aug
2023 14:51:52 -0700 (PDT)
Path: i2pn2.org!i2pn.org!weretis.net!feeder8.news.weretis.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.databases.ms-access
Date: Thu, 10 Aug 2023 14:51:52 -0700 (PDT)
Injection-Info: google-groups.googlegroups.com; posting-host=20.225.230.217; posting-account=ePetJQoAAADmfZjFb6ujjNCAT1M1_rFQ
NNTP-Posting-Host: 20.225.230.217
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <81772a0d-1442-4e72-933d-720548305492n@googlegroups.com>
Subject: pdDoc.Save 0, FileNm won't save!
From: abglaura...@gmail.com (ABG Laura)
Injection-Date: Thu, 10 Aug 2023 21:51:54 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
 by: ABG Laura - Thu, 10 Aug 2023 21:51 UTC

I have an Adobe PDF fillable form. I make a copy of the master form and save it with the name of the client in the user's folder. I fill out the form with data from the database. Then I use:

pdDoc.Save 0, FileNm 'File Name
pdDoc.Close

Every single time when it gets to pdDoc.Close it prompts to save and asks for the file name even though I already told it the file name. I've included my code below though it might not be clear. I've done extensive searching for the correct answer and gotten nada. Apparently I'm the first person it has ever happened to. I'm getting frustrated. Thanks so much for looking at it.

Laura

Code
******

Private Sub cmdFormFillTest_Click()

On Error GoTo Err_cmdGenProposal_Click

Dim fs
Set fs = CreateObject("Scripting.FileSystemObject")

Dim db As Database
Dim rst As Recordset

Set db = CurrentDb
Set rst = db.OpenRecordset("tmpContactFormFill")

fs.CopyFile "I:\Data\Contact Info Change Form.pdf", "c:\users\" & atCNames(1) & "\data\" & Me.PlanName & " Contact Change Form.pdf"

Dim FileNm, gApp, avDoc, pdDoc, jso

FileNm = "c:\users\" & atCNames(1) & "\data\" & Me.PlanName & " Contact Change Form.pdf" 'File location

Set gApp = CreateObject("AcroExch.app")

Set avDoc = CreateObject("AcroExch.AVDoc")
If avDoc.Open(FileNm, "") Then
Set pdDoc = avDoc.GetPDDoc()
Set jso = pdDoc.GetJSObject

jso.GetField("Plan name").Value = "" & Me.PlanName
jso.GetField("Plan Account Number").Value = "" & Me.PlanNumber

If rst.RecordCount <> 0 Then
With rst
.MoveFirst
jso.GetField("Plan Role").Value = "" & rst.Fields(2)
jso.GetField("Name").Value = "" & rst.Fields(3)
jso.GetField("Company Name").Value = "" & rst.Fields(7)
jso.GetField("Title").Value = "" & rst.Fields(6)
jso.GetField("Address").Value = "" & rst.Fields(4) & ", " & rst.Fields(5)
jso.GetField("Phone").Value = "" & rst.Fields(8)
jso.GetField("Email").Value = "" & rst.Fields(9)
'more stuff after this as it cycles through the table

End With
End If

pdDoc.Save 0, FileNm


pdDoc.Close

'The file does open with the name I gave it and it is filled out, but when I ask it to close, it prompts to save and the file name is gone. The save box opens and asks where do you want to save .pdf? (no file name even though I sent one).

End If

Set gApp = Nothing
Set avDoc = Nothing
Set pdDoc = Nothing
Set jso = Nothing

Exit_cmdGenProposal_Click:
Exit Sub

Err_cmdGenProposal_Click:
MsgBox Err.Description
Resume Exit_cmdGenProposal_Click
end sub

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor