Opening XFDL form using VBA

  • Thread starter Thread starter Chuck
  • Start date Start date
C

Chuck

I have a electronic form that is in the format of XFD or XFDL. The IBM
Lotus Form Viewer is used to open the form, enter information and can be
printed, saved, or emailed. I have a need to open the form from an Access
database and pass data to it, populating the form.

I have tried many methods, including FollowHyperlink, and the form does not
open. The viewer starts but it is blank. I even tried to open the viewer
and pass SendKeys command to do a CTRL+O to open the form, but that doesn't
even work. It's as if the viewer is blocking the access to the form.

I can open other files such as PDF, Excel, Word documents and even text
files using the same procedure. SendKeys works with every one of those
applications.

If you wish to try it out, the form, AF1946, can be found on
www.e-publishing.af.mil. The IBM viewer can be downloaded from there as
well. This is the last step in finalizing a database and I thought it would
be simple enough, but it sure has me stumped.

Thanks.
 
On Wed, 16 Dec 2009 16:29:46 -0500, "Chuck" <[email protected]>
wrote:

I have never used these softwares so I am speculating here.
Most document applications allow the path to a document be passed in
as an argument over the command line. Example:
"c:\program files\office\office 12\word.exe" "c:\test\test.docx"
Try that with your tools. You can invoke such command using VBA's
Shell function or the Windows API's ShellExecute function. You can
know if your app supports this if you can double-click a document file
in Windows Explorer and your app opens with the doc in it. (Windows
Explorer uses ShellExecute with the Open verb to launch the app that
created the document (better: is registered to handle the file
extension))

SendKeys would only work if the application has the focus. Otherwise
the keystrokes would go somewhere else. There are Windows API
functions to set the focus, but this gets fairly advanced.

Some document applications also are known as COM servers, in that you
can create an ActiveX object representing them, and then do things
like open a document, add a bunch of text, save it, etc. Word can do
this; can your app? The manufacturer would know? Maybe the app is even
in your References list (Code window > Tools > References).

-Tom.
Microsoft Access MVP
 
Chuck,
Did you ever get this to work?
I have a need to open an Army XFDL form from within MS Access.

Feel free to respond directly to (e-mail address removed)
 
Dim RunFunction

'RunFunction = Shell(Chr(34) & "C:\Program Files\IBM\Lotus Forms\Viewer\3.5\masqform.exe" & Chr(34) & " " & Chr(34) & "FilePath" & Chr(34))
 
Chuck, I have the exact situation and need to know if you got a fix for this? Please help.
Email me at (e-mail address removed)


QUOTE=Chuck;13725150]I have a electronic form that is in the format of XFD or XFDL. The IBM
Lotus Form Viewer is used to open the form, enter information and can be
printed, saved, or emailed. I have a need to open the form from an Access
database and pass data to it, populating the form.

I have tried many methods, including FollowHyperlink, and the form does not
open. The viewer starts but it is blank. I even tried to open the viewer
and pass SendKeys command to do a CTRL+O to open the form, but that doesn't
even work. It's as if the viewer is blocking the access to the form.

I can open other files such as PDF, Excel, Word documents and even text
files using the same procedure. SendKeys works with every one of those
applications.

If you wish to try it out, the form, AF1946, can be found on
www.e-publishing.af.mil. The IBM viewer can be downloaded from there as
well. This is the last step in finalizing a database and I thought it would
be simple enough, but it sure has me stumped.

Thanks.[/QUOTE]
 
I'm trying. I talked to Tier one support at Army CHESS. I'm supposed to get a call back from Tier 2 support tomorrow. I would like to use Lotus form viewer with Access. it would make things so much easier.

Did anyone get an answer on this?

I would like to be able to pass Access to lotus forms.
 
still nothing to this thread I see.... man with everyone using XFDL and VBA you would think someone would of figured a way to get us the answer.
 
Try creating a batch (.bat) file for it. I had a similar issue trying to create a link in a word document that would just open the blank lotus page. I created a .bat file pointing to the location of the file and it opened correctly. I don't know if that would work for what you're trying to do, but doesn't hurt to try.
 
I have a script that works for .XFD & .XFDL;

Dim objWSH As Object
Dim strPDFFile As String
Dim RunFunction
Dim strIBM As String

Set objWSH = CreateObject("WScript.Shell")
strPDFFile = "R:\IAO\DD Forms 2875 Database\" & [4394 Image] 'Location of the XFDL Image
strIBM = "C:\Program Files (x86)\IBM\Forms Viewer\4.0\masqform.exe " '(We use Windows 7 64 bit)
RunFunction = Shell(strIBM & Chr(34) & strPDFFile & Chr(34))
Application.FollowHyperlink RunFunction
 
Back
Top