How to change via VBA doc to docx?

H

hannu

Hi.

I have hundreds of doc-files and I need to change them all to docx-files, but manually it is very heavy job.

How via VBA it would succeed?

I have all in the same folder so it should automatically open first doc-file and then automatically save it as docx-file (file name should be the same otherwise), and then it should delete the old doc-file.

Is it possible?

hanski
 
R

ralph

Hi.

I have hundreds of doc-files and I need to change them all to docx-files, but manually it is very heavy job.

How via VBA it would succeed?

I have all in the same folder so it should automatically open first doc-file and then automatically
save it as docx-file (file name should be the same otherwise), and then it should delete the old doc-file.

Is it possible?

Check your Office Program Files for the utility 'WordConv.exe'. Then
use the following command line options to convert a file.

"C:\<path to office folder>\wordconv.exe" -oice -nme <input path\file>
<output path\file>
// watch for word wrap //
You could write a simple VBA, shell, or script routine to iterate
through the folder and build the file names in a loop.

[Note this utility is part of a trio of utilities (wordconv - Word,
excelcnv - Excel, and ppcnvcom - PowerPoint) that are called from the
Office File Converter (ofc). Apparently they were never meant to be
used directly - thus there is practically no information on the
command line options.]

-ralph
 
H

hannu

keskiviikko, 30. toukokuuta 2012 9.41.00 UTC+3 ralph kirjoitti:
Hi.

I have hundreds of doc-files and I need to change them all to docx-files, but manually it is very heavy job.

How via VBA it would succeed?

I have all in the same folder so it should automatically open first doc-file and then automatically
save it as docx-file (file name should be the same otherwise), and then it should delete the old doc-file.

Is it possible?

Check your Office Program Files for the utility 'WordConv.exe'. Then
use the following command line options to convert a file.

"C:\
\wordconv.exe" -oice -nme <input path\file>
<output path\file>
// watch for word wrap //
You could write a simple VBA, shell, or script routine to iterate
through the folder and build the file names in a loop.

[Note this utility is part of a trio of utilities (wordconv - Word,
excelcnv - Excel, and ppcnvcom - PowerPoint) that are called from the
Office File Converter (ofc). Apparently they were never meant to be
used directly - thus there is practically no information on the
command line options.]

-ralph

Thanks ralph, I'll try it.
 
P

Panic

"hannu" wrote in message

Hi.

I have hundreds of doc-files and I need to change them all to docx-files,
but manually it is very heavy job.

How via VBA it would succeed?

I have all in the same folder so it should automatically open first doc-file
and then automatically save it as docx-file (file name should be the same
otherwise), and then it should delete the old doc-file.

Is it possible?

hanski

If my .docx files could be sent to friends I always save them as Word
97-2003 Document (.doc) to insure those who didn't have Word 2011 could open
them properly.
 
P

Panic

"Panic" wrote in message "hannu" wrote in message
Hi.
I have hundreds of doc-files and I need to change them all to docx-files,
but manually it is very heavy job.
How via VBA it would succeed?
I have all in the same folder so it should automatically open first doc-file
and then automatically save it as docx-file (file name should be the same
otherwise), and then it should delete the old doc-file.
Is it possible?
hanski

If my .docx files could be sent to friends I always save them as Word
97-2003 Document (.doc) to insure those who didn't have Word 2011 could open
them properly.

But I tried highlighting several .doc files then right clicking them,
choosing Open. They all opened in Word 2011. One by one I chose Save As:
Word Document, which saved them as .docx files. I had to close Word after
saving to get rid of that file but then the next loaded .doc file showed up
in Word.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top