Sign in to follow this  
Followers 0
zabman

Unable to change fields in 'PDF to Excel 2.4'

1 post in this topic

#1 ·  Posted (edited)

Hi,

 

I am using some software called 'PDF to Excel 2.4' to convert some files to an excel format. I am trying to achieve this by calling AutoIT through Excel VBA. I have come across a problem almost immediately in that I can't seem to get AutoIT to modify a field within 'PDF to Excel 2.4' - I want to change the default folder selected. This can be done manually by either entering in freeform into the text field and clicking save, or by navigating through a folderview to select the folder & then clicking Save.

The problem is, I cannot seem to make autoit manipulate the value in the folder field. I have tried a couple of different functions to get this to work but no luck as yet. Here is the sub I have created in VBA - you can see I have tried a couple of different things already.

[font="Helv"][size="2"][font="Helv"][size="2"]Sub ConvertPDF()[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]Dim oAutoIt As New AutoItX3Lib.AutoItX3[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]Dim TRzEdit1 As Variant[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]Dim TMaskEditEx1 As Variant[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]Dim strCurrWin As String[/size][/font][/size][/font]
 
[font="Helv"][size="2"][font="Helv"][size="2"]strCurrWin = oAutoIt.WinGetTitle("")[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]oAutoIt.Run ("C:\Program Files\Blue Label Soft\PDF to Excel\PTEXCON.exe")[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]'oAutoIt.WinWaitActive "PDF to Excel Converter 2.4"[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]oAutoIt.ControlSend "PDF to Excel Converter 2.4", "", "TMaskEditEx1", "C:\Documents and Settings\akl-jamest\Desktop2"[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]'oAutoIt.ControlSetText "PDF to Excel Converter 2.4", "", TMaskEditEx1, "C:\Documents and Settings\akl-jamest\Desktop2"[/size][/font][/size][/font]
[font="Helv"][size="2"][font="Helv"][size="2"]'oAutoIt.ControlClick "PDF to Excel Converter 2.4", "", TMaskEditEx1[/size][/font][/size][/font]
 
[font="Helv"][size="2"][font="Helv"][size="2"]End Sub[/size][/font][/size][/font]

Does anybody have any ideas?

Edited by zabman

Share this post


Link to post
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0