Ask a Question related to Adobe Acrobat SDK, Design and Development.
-
Kevin_Ha@adobeforums.com #1
How to Hide Acrobat When Running VBA Code
I am using Acrobat 9.
My project adds text to Acrobat fillable fields using VBA written in Access 2003. I take records from my Access database, and populate it into different Acrobat Forms based on the field name in the Acrobat Form. I am able to do this, but there is one problem.
The problem is that as the code runs through populating text in the Acrobat Forms, Acrobat opens up each form, and makes it visible to the user. It populates quick, but it is still visible. I want this to run in the background, or at least be minimized in the windows taskbar. The users should not not know which form the Application is updating. It should be hidden or invisible. That is the goal at least :)
I know which line in the code causes it to Maximize, but if I remove that line, I receive an error about No Document Currently Open in Acrobat Viewer.
Here is the snippet of the code I am using. Any help would be greatly appreciated.
Dim gApp As Acrobat.CAcroApp
Dim avdoc As Acrobat.CAcroAVDoc
Dim gPDDoc As Acrobat.CAcroPDDoc
Const DOC_FOLDER As String = "C:\Trial"
Dim x As Boolean
Set gApp = CreateObject("AcroExch.App")
Set gPDDoc = CreateObject("AcroExch.PDDoc")
Set avdoc = CreateObject("AcroExch.AVDoc")
'Hides Acrobat - So Far So Good
gApp.Hide
Dim FormApp As AFORMAUTLib.AFormApp
Dim AcroForm As AFORMAUTLib.Fields
Dim Field As AFORMAUTLib.Field
'Open PDF that I choose. Acrobat still has not flashed on my screen
x = avdoc.Open(DOC_FOLDER & "\trial.pdf", "temp")
'Acrobat Now Pops up on my screen. However, I get an error without this line. avdoc.Show works the same as Maximize it seems.
avdoc.Maximize(1)
'Hides it again, right after it opens. This creates a flash
gApp.Hide
Set FormApp = CreateObject("AFormAut.App")
'If the Maximize line is not there, this is where I receive error about document viewer
For Each Field In FormApp.Fields
If Field.Name = "Sample_FieldName" Then
Field.Value = TextToUse
End If
Next
Please let me know if you can think of a way to keep Acrobat hidden. Thank you.
Kevin_Ha@adobeforums.com Guest
-
Hide Acrobat When/After Printing PDF with printdialog
I'm having the same issue. The external window shows up regardless if I'm trying to use OLE (printwithdialog) or even an own plugin... -
Where does Adobe now hide Mac Acrobat 7 for buying/downloading??
I searched the site and can find NO place where one can now buy Acrobat 7. All such links now direct you to Acrobat 8. BAD DESIGN! And since Adobe... -
how do i hide FireWorks code for drop downs
I am trying to hide or create a direct link for my fireworks drop down menu so that it doesn't show up in the source code of all of my pages. I... -
Hide Acrobat Toolbar & Menu in Visio
Is there a way to hide the Acrobat toolbar and menu in Visio. For the toolbar, I can turn it off, but the next time I open a drawing it comes back. I... -
Hide code form other FTP users
Hi Whilst browsing the MSDN on day, I am sure I saw an article on 'How to encode your ASP code within the asp page', but I can not find it... -
Leonard_Rosenthol@adobeforums.com #2
Re: How to Hide Acrobat When Running VBA Code
Use standard VB/Windows features to minimize the app.
Leonard_Rosenthol@adobeforums.com Guest



Reply With Quote

