ActiveDocument.Convert command in Word 2007 VBA

R

rgmw

When I run the VBA code containing the command:

ActiveDocument.Convert

I receive an error message that states "Command is not available".

To troubleshoot the document, I step through the process. My routine
brings up the document, and then does the convert. When I step through
my code, I can look in the document and see the "Convert" command on
the Office Button menu. The next step I do, the convert command is
performed.

But, I go back to letting my routine loop through a directory, then
the routine crashes on ActiveDocument.Convert.

So, how can I get "ActiveDocument.convert" not to crash my routine?
Any ideas?

Thanks,

Rich
 
G

Graham Mayor

The command will fail if the document is already converted.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
R

rgmw

As I step through the subroutine, I can look into the document and see
that the "Convert" command is on the Office button menu and is
active.
 

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