Hi all,
I have a problem here while working on decoding an InfoPath attachment in the VSTA code using this link. http://support.microsoft.com/kb/892730. This code is working fine for converting Base64binary into a byte array. But the problem here is, we can't assign a byte array to a field in infopath form. For this, I need to convert this byte[ ] into a string to assign to a particula field in InfoPath. When ever i try to assign a string value, which is decoded from an "MS word" document attached to the infopath attachment control, it's throwing an error "An invalid character was found in text content ".
But the same concept is working fine for "notepad" files. If it is a word document or PDF, then it's showing the string value in a different language like "content = "PK \0 \0\b\0\0\0!\0???7f \0\0 \0\0 \0\b [Content_Types].xml ? (?\0 \0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\...".
I have searched a lot on Web for the solution, unfortunately i didn't get any. Eagerly waiting for a solution.
Thanks,
Kalyan.