Automate the Export to Excel aspect of a form - InfoPath Dev
in

InfoPath Dev

Automate the Export to Excel aspect of a form

Last post 06-12-2009 01:19 PM by rconverse. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 06-12-2009 01:19 PM

    Automate the Export to Excel aspect of a form

    Hello,

    InfoPath is an application that I've stumbled onto. Using its capabilities with SharePoint is a very attractive opportunity right now. In order for this revised process to work as well as possible, it would be really great to be able to automate the conversion of the InfoPath files to Excel worksheets.

    When you open an InfoPath form, under the file menu one of the selections is export to Excel. Excel holds references from InfoPath. Using VBA, I can't figure out how to:

    1.) Open the InfoPath file
    2.) Export to Excel

    I'm pretty sure I can handle the rest. Anyone at all able to help me?

    Maybe something like:

    Sub test()

    Dim ap As InfoPath.Application

    Dim vo as InfoPath.ViewObject

    ap.Xdocuments.Open("My Documents", "test.xml")

    vo.Export(strPath, strFormat)

    ap.quit

    set ap = nothing

    end sub

    It appears that this is something that can be done, I just can't figure out how to do it.  I'd be trying to use the references in Excel to control InfoPath, so I am not sure if this post is in the right forum.  If there's a way to do this using InfoPath, then I'm open to that suggestion too.

    Thanks,
    Roger

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.