0 Replies - 404 Views - Last Post: 02 July 2014 - 12:13 PM Rate Topic: -----

#1 xtreampb  Icon User is offline

  • D.I.C Regular

Reputation: 14
  • View blog
  • Posts: 337
  • Joined: 20-June 07

What is the difference in open in code and open via explorer

Posted 02 July 2014 - 12:13 PM

Hello all,

I'm using vba/vb6 in an access program to generate XFDF (pdf file data format) to populate a form. I have created the form in pdf and everything loads fine. I have also created some Javascript that save the PDF in the background. In my code i have the following in a module:
Option Compare Database

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Sub EVN(ByVal loc As String)
    ShellExecute 0, "Open", loc, "", "", vbNormalFocus
End Sub

'Sub GenPDF(loc As String)
'    Shell loc, vbNormalFocus
'End Sub

as you can see, there is a commented out section. They both produce the same results. When I open the xfdf document from explorer, it loads the proper form base and the javascript loads and execuites with out a problem. When i use the code above, the form still loads and populates the fields, but the javascript errors out. I know my javascript works because when opened from explorer, i have no issues. Are there any parameters that I am unaware of the explorer is sending that I could/should include in my code as a variable? How would I tell what, if any, variables are being sent at application launch?

Is This A Good Question/Topic? 0
  • +

Page 1 of 1