The Result looked like an empty Word instance with no Document loaded. I also tried to load the Document and make Word Visible. If I open the Source File directly in Word it is no Problem. If I comment out the whole foreach Block so that I would only open and save the Document, I get the same result. In Word 2013 this is found unter the Topic "Formulare aus Vorversionen" (I would translate this to "Formfields from former Versions") I would like to fill in form fields in a premade PDF doc, but Im receiving a Null Refrence error with AcroForm. I created an Document only conaining one Text Form Field. I created a simple Word Document with a bit of unformated text and 2 Text-Form-FieldsĬan anyone tell me, what went wrong or if ia have an Error in my Source Code This example displays the text of the item selected in the drop-down form field named 'Colors. Document doc = new .Document() įoreach (.FormField field in doc.FormFields)į = Word can not open the File Ausgefuellt.docx and Shows a Message saying that an unknown Error has occured. If the DropDown property is applied to a FormField object that isn't a drop-down form field, the property won't fail, but the Valid property for the returned object will be False. I tried to Fill out Form Fields in Microsoft Word using C# Interop Assemblies with the following Code string filename = word = new .Application()
0 Comments
Leave a Reply. |