Processing
 

C# To Generate Word Document

19/09/2016 01:38#1

Sean

Member

Joined at: 12 months ago

Post: 156

Thank: 0

Thanked: 0

So I have a friend who is helping me and I'm really not a programmer but I can understand things when I have a template to build from.

I'm trying to create a program that accepts input from the user to generate a report for traffic accidents. Just to get started I was going to try and learn as much as I could to create the notification section which requires very little input and has little variance.

Section in CAPS would be the input requested from the user. It would be used in other areas so it should be stored as a string for other sections. Also, later there will be areas where the user has to enter parties, witnesses, and vehicles. Since there could be any number of combinations of the three it would have to be programmatically generated where as the notification could be find and replace.

Can someone point me in the right direction with an example code for just the following:

NOTIFICATION: On DATE_DISPATCHED, at approximately TIME_DISPATCHED hours, I was dispatched to LOCATION_DISPATCHED at COLLEGE for a report of a CALL_TYPE

NOTIFICATION: On 01-01-2000, at approximately 1000 hours, I was dispatched to South Lot at 1010 Address St for a report of a small narrative about what happened.

19/09/2016 01:49Top#2

Ryan Hu

Member

Joined at: 8 months ago

Post: 2

Thank: 0

Thanked: 0

If you are trying to assemble a word document based on a template and some user's input. I think HotDocs is what you need.

If you want to assemble a document programmatically you may refer to Word Add-ins or Office App from Microsoft. Or OpenXML Power Tools for more flexibility.

Similar articles

VBA regex matching over two lines

6 months ago - Reply: 1 - Views: 44

Table output to Word-2011 from Rstudio using knit

6 months ago - Reply: 0 - Views: 48

Write a Collection of paragraphs into a new document

6 months ago - Reply: 1 - Views: 72

how to write paragraphs without show to document

6 months ago - Reply: 1 - Views: 67

numericals in word macro

6 months ago - Reply: 1 - Views: 46

Can not find proofing tools

6 months ago - Reply: 0 - Views: 3

Possible values for <w:outlineLvl> in Word OOXML

6 months ago - Reply: 1 - Views: 8

C# restrict editing partial word paragraph

7 months ago - Reply: 2 - Views: 146

Macro translation Please (possible virus)

6 months ago - Reply: 1 - Views: 35

Doc/Docx Fastest Reading Method for Searching

6 months ago - Reply: 0 - Views: 3

Save embedded file / content from word

6 months ago - Reply: 0 - Views: 6

Counting words in Word document, including footnores

6 months ago - Reply: 1 - Views: 24

c# access extract word ole object

6 months ago - Reply: 1 - Views: 25

Using word wildcards to find unaccepted changes

6 months ago - Reply: 1 - Views: 46

vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re vé máy bay vé máy bay giá rẻ ve may bay ve may bay gia re