Opening XFDL form using VBA

Discussion in 'Microsoft Access VBA Modules' started by Chuck, Dec 16, 2009.

  1. Chuck

    Chuck Guest

    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.
     
    Chuck, Dec 16, 2009
    #1
    1. Advertisements

  2. On Wed, 16 Dec 2009 16:29:46 -0500, "Chuck" <>
    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



    >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.
     
    Tom van Stiphout, Dec 17, 2009
    #2
    1. Advertisements

  3. Chuck

    Adam L Guest

    Question for Chuck

    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

    > On Wednesday, December 16, 2009 4:29 PM Chuck wrote:


    > 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 does not
    > even work. it is 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 Wednesday, December 16, 2009 11:37 PM Tom van Stiphout wrote:


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



    >> Submitted via EggHeadCafe - Software Developer Portal of Choice
    >> ASP.NET HttpPostedFile Image Resizer
    >> http://www.eggheadcafe.com/tutorial...8778/aspnet-httppostedfile-image-resizer.aspx
     
    Adam L, Sep 14, 2010
    #3
  4. Chuck

    Adam Rigdon Guest

    Lotus Forms Opening

    Dim RunFunction

    'RunFunction = Shell(Chr(34) & "C:\Program Files\IBM\Lotus Forms\Viewer\3.5\masqform.exe" & Chr(34) & " " & Chr(34) & "FilePath" & Chr(34))

    > On Wednesday, December 16, 2009 4:29 PM Chuck wrote:


    > 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 does not
    > even work. it is 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 Wednesday, December 16, 2009 11:37 PM Tom van Stiphout wrote:


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



    >>> On Tuesday, September 14, 2010 5:15 PM Adam L wrote:


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



    >>> Submitted via EggHeadCafe - Software Developer Portal of Choice
    >>> Flat file Database with LINQ and ASP.NET jQuery Page Methods
    >>> http://www.eggheadcafe.com/tutorial...with-linq-and-aspnet-jquery-page-methods.aspx
     
    Adam Rigdon, Oct 14, 2010
    #4
  5. Chuck

    carlanthony

    Joined:
    Sep 21, 2011
    Messages:
    1
    Likes Received:
    0
    Chuck, I have the exact situation and need to know if you got a fix for this? Please help.
    Email me at


    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]
     
    carlanthony, Sep 21, 2011
    #5
  6. Chuck

    JCowles

    Joined:
    Oct 11, 2011
    Messages:
    1
    Likes Received:
    0
    Did anyone get an answer on this?

    I would like to be able to pass Access to lotus forms.
     
    JCowles, Oct 11, 2011
    #6
  7. Chuck

    MoDan

    Joined:
    Oct 31, 2011
    Messages:
    1
    Likes Received:
    0
    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.

     
    MoDan, Oct 31, 2011
    #7
  8. Chuck

    Mad Max

    Joined:
    Mar 14, 2012
    Messages:
    1
    Likes Received:
    0
    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.
     
    Mad Max, Mar 14, 2012
    #8
  9. Chuck

    ben4322

    Joined:
    Apr 4, 2012
    Messages:
    1
    Likes Received:
    0
    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.
     
    ben4322, Apr 4, 2012
    #9
  10. Chuck

    Daren

    Joined:
    Apr 30, 2015
    Messages:
    1
    Likes Received:
    0
    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
     
    Daren, Apr 30, 2015
    #10
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jonathan Blitz

    Using VBA code to create a command bar entry to open a form

    Jonathan Blitz, May 12, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    0
    Views:
    229
    Jonathan Blitz
    May 12, 2004
  2. Guest

    Run vba on form opening

    Guest, May 25, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    2
    Views:
    1,016
    John Vinson
    May 27, 2004
  3. Dirk Goldgar

    Re: Switching to Form view from design view using VBA

    Dirk Goldgar, Jun 24, 2004, in forum: Microsoft Access VBA Modules
    Replies:
    5
    Views:
    1,106
    Dirk Goldgar
    Jun 25, 2004
  4. Guest

    Global variables lost when opening a VBA-generated form.

    Guest, Apr 19, 2007, in forum: Microsoft Access VBA Modules
    Replies:
    4
    Views:
    1,303
    Albert D. Kallal
    Apr 21, 2007
  5. Naz

    Opening form using 2 criteria

    Naz, Sep 2, 2009, in forum: Microsoft Access VBA Modules
    Replies:
    9
    Views:
    283
    Ken Snell [MVP]
    Sep 2, 2009
Loading...

Share This Page