Setting field values in merged documents

Setting field values in merged documents

Forum member · Aug 12, 2006
I have a single page test PDF with two Text fields called Text1 and Text2 I want to merge multiple copies of the test document and on each merged page I want to set unique values for Text1 and Text2 I am able to successfully set values for the first page. But not for the appended pages. Here is sample code (VB6) 'Set up the merge option objects Dim oMergeOpt0 As New MergeOptions oMergeOpt0.MergeFormFields = True oMergeOpt0.RootFormField = "F0" Dim oMergeOpt1 As New MergeOptions oMergeOpt1.MergeFormFields = True oMergeOpt1.RootFormField = "F1" 'Load up first page of our document. Dim objDoc As New DynamicPDF.Document objDoc.LoadPdf App.Path & "/PDFs/Test.pdf", , , oMergeOpt0 'Stuff some values objDoc.Form.fields.Item("F0.Text1").Value = "Sunny" objDoc.Form.fields.Item("F0.Text2").Value = "Delight" 'Append the next page objDoc.AppendPdf App.Path & "/PDFs/Test.pdf", , , oMergeOpt1 'Stuff values on Appended page (PRODUCES ERROR) objDoc.Form.fields.Item("F1.Text1").Value = "Apple" The last line errors. I am unable to refer to the "F1" page. The merged document does contain two pages with fields named ---Page 1 --- F0.Text1 F0.Text2 ---Page 2 --- F1.Text1 F1.Text2 I simply am not able to reference the F1. fields I notice the objDoc.Form.Fields.Count Does not imcrement when the additional pdf is appended which may be a clue to the problem Any help would be appreciated Dave

Re: Setting field values in merged documents

Support · Aug 14, 2006
Hello Dave, Can you please send the original PDF document you are using to merge to our [^a|mailto:support@cete.com|Support Team^], so that they will try to create the same behavior at their end? Thanks, ceTe Software Support Team