Opening XFDL form using VBA

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.
 
T

Tom van Stiphout

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top