What my program does is it takes some text from one document and replaces a tag in another document (.docx).
With most documents this works absolutely flawlessly, but sometimes I run into an Argument Exception:
'♂' hexadecimal value 0x0b is not a valid character
' ' hexadecimal value 0x07 is not a valid character
Now I looked through the documents that these exceptions occur in (mostly .docs) (sorry can't share those here, company secrets etc.) and I couldn't find the referenced characters in those anywhere. I also looked at the extracted text and couldn't find any malicious characters in there nor are there any in the document title (I got rid of all non alphanumerical characters).
Also the exceptions occurs during the document.SaveAs() function.
Does anyone know what the Problem could be here, if I should post my code I'll gladly do it.