I have an expense entry solution for a client that leverages InfoPath and workflow. At one point during the approval process, Ég þarf að búa til tölvupóst sem hefur öll þessi góðu gögn InfoPath og viðhengi sig svo að (andvarp) someone can take that data and manually re-key it into an Oracle database application.
It’s not very difficult to get at or parse the InfoPath form. I didn’t know how to handle the attachments, þó. After an hour or two of poking around the Internets (an eternity!) I found this article: http://support.microsoft.com/kb/892730
It provide some handy code to extract the attachment from a node in the form. (You still need to find the node and all that, but that’s just XML parsing).
I know that the attachment is base64-encoded and I originally went down the path of just extracting the the base64 data, decoding it and saving it. Hins, I quickly realized I didn’t know how to get the file name itself until I found the aforementioned article.
I had actually found that quite early, but I was put off by its split personality. On the one hand, the article *says* it’s good for InfoPath 2007. En, the code and instructions are all about Visual Studio 2003 and references to InfoPath 2003.
Neðsta lína, the code that article provided is working well for me (svo langt). I can get my InfoPath form, I can parse it, I can find and decode the attachment and I know its name. What more can one ask of one’s life?
</enda>
Gerast áskrifandi að bloggið mitt.
Fylgdu mér á Twitter á http://www.twitter.com/pagalvin
If you’re worried that your SharePoint environment may be a tad unhealthy, let me help you fix that with a health check.