[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1395
  • Last Modified:

How can I programmatically add a file attachment to an InfoPath form using VB.Net?

Would anyone know how to add a file from disk to a InfoPath 2007 form as a
file attachment using VB.net code? The following link has a c# example but I
can not get this to work.
http://www.cubido.at/Blog/tabid/176/EntryID/44/Default.aspx

Thanks
0
kbessent1966
Asked:
kbessent1966
  • 2
  • 2
1 Solution
 
Clay FoxDirector of Business IntegrationCommented:
You want to have a file automatically attached or you do not want to have the user browse for it?

I have done a seperate attach process to automatically take an email attachment and inject it into a form before.

Give me a bit more details of what you are trying to do.
0
 
kbessent1966Author Commented:
Hi Clay,

Thanks for your response, I need to inject a PDF file into the form as an attachment. The PDF file is located on the local PC hard drive. Therefore, the user will not browse for it, the user clicks a button within the form, then the vb.net code collects the C:\test.pdf file, encodes to base64, assigns header info etc. The user then can open the PDF from the InfoPath form via a standard attachment control (right click open).

Hope this clears things up.
0
 
Clay FoxDirector of Business IntegrationCommented:
I did this exact thing about a year and a half ago. I have the solution and source code.

Why don't you email me from here and we can discuss.
http://www.infopathdev.com/members/clayfox.aspx
0
 
kbessent1966Author Commented:
Hi Clay, I have emailed you directly about obtaining the source code for this problem, when you have chance, could you please email a copy to me at kb@donovanhill.com.au
Thanks Kevin Bessent.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now