Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Complete .PDF form in VBA

Hi !
I can open a pdf file in VBA using the following code. Is there a way to
copy a text in a specific box inside the .pdf (the pdf file has boxes that
need to be completed). I don't need to save the pdf file (just open it and
complete it)
Is there a Adobe library that can be used to select box#1, #2, etc.
Thank's a lot!
Alex

Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")

myURL = "C:\myPdfFile.pdf"
On Error Resume Next
myIE.navigate myURL
myIE.Visible = True
On Error GoTo 0
--
Alex St-Pierre
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 169
Default Partial solution

Hi !
I use the following VBA programmation to complete a pdf form (using
SendKeys). Once the form is completed, the users can make modifications.
After the form has been modified, the user return in Excel and save the pdf
parameters. Is there a way to catch the selection content of a pdf file? When
the PDF document is activated, the command Application.SendKeys send the
value in the PDF document but Application.Selection doesn't return the PDF
selection. Any idea?

Actual VBA code to modify a pdf document:
Dim myIE As Object
Dim dReturnValue As Double
Set myIE = CreateObject("InternetExplorer.Application")
myIE.navigate "http:\\... \file.pdf 'Open the pdf
myIE.Visible = True
dReturnValue = Shell("IEXPLORER.EXE", vbNormalFocus)
AppActivate dReturnValue 'Activate the pdf
Application.SendKeys "{TAB}", True
Application.SendKeys "TEXTVALUE1", True
Application.SendKeys "{TAB}", True
Application.SendKeys "TEXTVALUE2", True
etc.
I would like something that do the same steps but record the selection in
each pdf cell's like:
'Save PDF information
AppActivate dReturnValue 'Activate the .pdf
Application.ReturnToTheBeginningOfTheFile (Can be done using Shift-Tab...)
Application.SendKeys "{TAB}", True
vInformation = Application.Selection 'This doesn't word (???)
Thisworkbook.Sheets("Sheet1").Cells(1,1) = vInformation
AppActivate dReturnValue 'Activate PDF
Application.SendKeys "{TAB}", True
vInformation = Application.Selection 'Read the contents of the box #2
Thisworkbook.Sheets("Sheet1").Cells(2,1) = vInformation
etc.

Thank's a lot!
Alex
--
Alex St-Pierre


"Alex St-Pierre" wrote:

Hi !
I can open a pdf file in VBA using the following code. Is there a way to
copy a text in a specific box inside the .pdf (the pdf file has boxes that
need to be completed). I don't need to save the pdf file (just open it and
complete it)
Is there a Adobe library that can be used to select box#1, #2, etc.
Thank's a lot!
Alex

Dim myIE As Object
Set myIE = CreateObject("InternetExplorer.Application")

myURL = "C:\myPdfFile.pdf"
On Error Resume Next
myIE.navigate myURL
myIE.Visible = True
On Error GoTo 0
--
Alex St-Pierre

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I get a curser to complete Excel form received? Hen Bogan Excel Discussion (Misc queries) 0 September 5th 06 11:49 PM
Percent Complete? bassec Excel Discussion (Misc queries) 1 March 28th 06 08:11 AM
Forcing users to complete a form BK Excel Discussion (Misc queries) 3 November 22nd 05 12:35 AM
Forcing users to complete a form BK Excel Programming 2 November 17th 05 09:51 AM
Run time - % complete Steph[_3_] Excel Programming 3 June 25th 04 10:47 PM


All times are GMT +1. The time now is 06:43 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"