Frage

I have recently been tasked with a project to convert a LARGE (1000+) amount of Word for Dos (Word 5.5) documents(.doc) that need to be converted / Saved As to a .rtf extension.

The documents are in a folder with sub folders that need to stay intact, so I will need to search to see what files are in folders then open and save as in the same folder format as they were found in but in a different location as a .rtf document.

I have been looking into how to best think of going about such a task, here is what I would like to archive:

Recursive Folder search to a CSV (defined by user or fixed folder location) Create folder structure (same level as folder search, E.g. Converted/folder/sub-folder) Open Files in Word for Dos 5.5 Save As .rtf Log of files converted ( as successful or as failed)

War es hilfreich?

Lösung 2

Unfortunately I would use the paid converters if I was able but this is something that we are only able to use VB.net for.

I am unable to upload any samples of the documents or errors I can only describe them.

I have since worked out a way around this, I was able to convert the document, using Word 5.5 but it has lost some formatting of the document.

I am in the process on attempting another solution, I will post again if I have any luck.

Andere Tipps

I would do this in Word VBA and not VB.Net (see vba and word-vba Stack tags).

Search the web for FileSystemObject() for snippets for iterating over folders, making directories, etc. I would make the destination folders only when you need them so you can tell if you are done processing the source folder so the task is re-startable. Perhaps use a temp folder as destination and then rename/move to the final folder name when source files are all converted.

Record a macro of you doc open and save as steps to use as a model for the core code.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top