Reply
 
Thread Tools Display Modes
  #1   Report Post  
JP
 
Posts: n/a
Default How do I use a macro to open a doc as text, without conversion

I need to open a document as txt, via a macro (Wd2003). I was helped earlier
this week to find the confirm conversions option but with this set, the txt
option still needs to selected manually before the macro continues.

Here is the part of the macro which opens the document:

Documents.Open FileName:="""DM Schedule.htm""", ConfirmConversions:=False,
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto,
XMLTransform:="", _
Encoding:=1252

With ConfirmConversions:= set to False, it opens as a word doc. If set to
True, itwaits for manual instruction to open as txt.

I figure there must be a way to preset the txt option.

Thanks for looking at this ....




  #2   Report Post  
JP
 
Posts: n/a
Default

Sorry folks ... I just found my own answer ... if anyone is interested, it
works if you change Format:=wdOpenFormatAuto to Format:=wdOpenFormatText

"JP" wrote:

I need to open a document as txt, via a macro (Wd2003). I was helped earlier
this week to find the confirm conversions option but with this set, the txt
option still needs to selected manually before the macro continues.

Here is the part of the macro which opens the document:

Documents.Open FileName:="""DM Schedule.htm""", ConfirmConversions:=False,
ReadOnly:=False, AddToRecentFiles:=False, PasswordDocument:="", _
PasswordTemplate:="", Revert:=False, WritePasswordDocument:="", _
WritePasswordTemplate:="", Format:=wdOpenFormatAuto,
XMLTransform:="", _
Encoding:=1252

With ConfirmConversions:= set to False, it opens as a word doc. If set to
True, itwaits for manual instruction to open as txt.

I figure there must be a way to preset the txt option.

Thanks for looking at this ....




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Possible bug when recording a Word Macro Raven95 Microsoft Word Help 4 April 30th 05 09:49 PM
How do I get rid of the same text that appears everytime I open a. kellychristiansen2 Microsoft Word Help 1 January 8th 05 06:07 PM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM
Text Recovery and Open & Repair in WD 2003? UserRAW1975 Microsoft Word Help 1 December 22nd 04 03:00 AM
2000 to 2002 macro and "Could not open macro storage" Art Farrell Mailmerge 1 December 6th 04 12:40 PM


All times are GMT +1. The time now is 07:33 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"