Jon Wall
Jon Wall

Reputation: 1

What is the best way to change the order of Field Codes in .docx and .doc files using C#?

Apologies if this question is vague.

I have thousands of .docx and .doc files that need to be altered so that the field codes have a changed order. It is a relatively simple job to do manually, however the sheer number of files will take forever to do.

I have been learning the basics of C# recently and I would like some advice and guidance to see if automating the process is possible, and if so, how I would go about doing so.

I would like the program to read a .docx or .doc and search for a sequence of field codes eg.

{ FIELDCODE1 }/{ FIELDCODE2 }/{ FIELDCODE3 }

Then edit the file so the document then reads:

{ FIELDCODE2 }/{ FIELDCODE3 }/{ FIELDCODE1 }

Any help would be much appreciated.

Thanks in advance,

Jon

Upvotes: 0

Views: 62

Answers (0)

Related Questions