beedistinct
Board Regular
- Joined
- Jun 24, 2011
- Messages
- 62
I'm using excel 2013 preview.
I need to embed this convert.exe (PDF to Text converter) in the excel file (as "Object 1" - done!) and then execute it via a VBA macro. I'm embedding it because I don't want to ship it separately with the excel file.
The code looks like below.
There are 2 problems:
1. It opens a dialogue box asking me to run the application while I want it to run in the background.
2. I cannot figure a way to provide the pdf file path that it needs to convert to text
I need to embed this convert.exe (PDF to Text converter) in the excel file (as "Object 1" - done!) and then execute it via a VBA macro. I'm embedding it because I don't want to ship it separately with the excel file.
The code looks like below.
Code:
Private Sub Workbook_Open()
Dim ws As Worksheet
Dim oo As OLEObject
Set ws = Sheets("Sheet1")
Set oo = ws.OLEObjects("Object 1")
If Not oo Is Nothing Then
oo.Verb xlVerbPrimary
Application.WindowState = xlMinimized
End If
End Sub
1. It opens a dialogue box asking me to run the application while I want it to run in the background.
2. I cannot figure a way to provide the pdf file path that it needs to convert to text