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