Re: Word from command prompt?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Word doesn't have an export filter to CSV the way Excel does. If the
document contains a table and you want it to be comma-separated, you
can use the Table > Convert > Table to Text command inside the
document and tell it to separate the cell contents with commas. Then
save the document as a Plain Text (*.txt) file, and change the
extension to .CSV if desired.

It's probably easier to copy the table to the clipboard, paste it into
Excel, and save the resulting worksheet as a CSV file.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

On Fri, 26 Jan 2007 16:33:47 -0800, asadim
<asadim@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:

Thanks. Also another question: is it possible to convert tabulated Word docs
to CSV files? e.g. I want a comma between each table cell in the CSV file.

"Jay Freedman" wrote:

Using the /m switch (see http://support.microsoft.com/?kbid=210565) you can
run a macro or a built-in command that doesn't need any further information
(such as FilePrintDefault, which prints the document without displaying the
Print dialog).

Since saving any document in a specific format requires further information
(the format, directory, and filename to save to), you can't put that command
directly in the command line. If you write a macro to do the job, you can
run the macro from the command line.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

asadim wrote:
Is it possible to execute MS Word commands from the command prompt?
If so how is it done?

I'm wondering if I can convert Word docs to txt files from the command
prompt. I know it is possible from within the program, but was
wondering if there's a command line interface for it.

Thanks.



.



Relevant Pages

  • Re: convert number to text without losing zeroes
    ... I am not opening the .csv file.. ... I believe excel brings each item in as a custom format if it is all numbers, ... in Excel converting it to a number and dropping the zero. ...
    (microsoft.public.excel.misc)
  • Re: convert number to text without losing zeroes
    ... use a custom format of 000000, then those leading zeros are preserved when excel ... saves the file as a .CSV file. ... treated as a number but retains the zero. ...
    (microsoft.public.excel.misc)
  • RE: WorkbookOpen in COMAddin for CSV-files
    ... I 'm starting to think that the CSV path name may be too long. ... Maybe try putting the CSV file on a short path or Map ... Another possibility is the command line that opens the CSV file is modified. ... Because you are dealing with a CSV file something is opening excel using the ...
    (microsoft.public.excel.programming)
  • Re: convert number to text without losing zeroes
    ... I've never seen excel drop the leading 0's when saving as a .csv file in any ... You may want to try saving the .csv file and then check using notepad once more. ... always drops the zero. ...
    (microsoft.public.excel.misc)
  • Re: Reading an Excel Worksheet
    ... cursor in VFP and Append From the CSV file. ... What I usually do is go into Excel, record a macro, and then use the VBA ...
    (microsoft.public.fox.programmer.exchange)