View Single Post
  #9   Report Post  
Posted to microsoft.public.office.misc,microsoft.public.word.docmanagement
Bob Buckland ?:-\)
 
Posts: n/a
Default Open word in text mode

Hi Jay,


You can use Word as an editor to have 'familiar feeling' tools but it's probably not as widely used as a source code editor as it
once was. More specialized tools (including even the MS Windows Script Editor that ships with Office 2000, XP/2002 and 2003) do a
nice job of *displaying* the code in different indentations and colors to help edit it, without actually saving that in your data.

You can use CSS styles attached to Word and with Word 2003 XML capabilities to also do some of that transformation, but as you
mentioned, without doing work you don't start off with much more than Wordpad/Notepad as far as those capabilities go.

You can use Tools=Options=General and set
[x] Confirm conversions at open
to be on. So that when you open anything but a .DOC file Word will ask you how you want it to be treated. (For example if you open
a .htm file it will suggest HTML conversion to .doc, but you can select the 'plain text' choice to tell it to present it as the HTML
source code).

You can also use Tools=Options=Save to select 'plain text' as the default save format for documents, however. that isn't going to
disable your ability to apply Word formatting to text in that file you open (bold, blue, 27pt font...) only to have it stripped out
again on save.

Yes, you can start Word with a template where the 'normal' style would be set up to be plain text look (courier 12 or 10 pt font for
example). And you can use registry settings or, through a template you could set the default paste format of the clipboard to be
'unformatted text' or a separate 'paste' button to do that.

In Word 2000 through 2003 the default paste/data format Word puts on the clipboard does include the markup to be able to include the
formatting from a Word document. Some programs or even different versions / releases of some programs have different methods or
abilities for utilizing what is on the clipboard. That is, the 'receiving' program may choose to 'see' just the text as the default
(but that may be 'plain (ascii) text' or unicode (2 byte) text), or RTF or the Word XML/HTML format. The same thing happens coming
into Word when pasting, usually more 'noticed' for graphics.

Using Edit=Paste Special in Word (and where available, in other programs) shows the available formats and the default that you can
use for a given operation. Word also has, for incoming (paste) operations, the paste options button to help select how incoming
data will 'fit in' to its Word surroundings at a given spot in a document. Word does not have, unfortunately, a 'copy options'
button to do the same thing, putting reliance on the program you're going to copy to, to decide how it treats text.

As an example, MS Office FrontPage 2000 did not handle the Word clipboard output well. FrontPage 2003 is 'smarter' (i.e. tuned to
deal with it g by having additional paste options). In Dreamweaver MX you can paste from a Word document and then use the 'Word
cleaner' icon to shave down the Word content to 'web type' HTML by working on the markup that comes over as, for example. MS Office
(Mso)document CSS style data.

Using 3rd party editors (other than FrontPage or Dreamweaver) including the favorites of folks who have contributed to this
discussion, and similar ones such as the http://ultraedit.com include enhanced file comparison modes, spell check and 'autocomplete'
in context and other features tuned more for the 'behind the scenes' data work, just as the MS Office VBA editor in Word includes
'lookup' / autocomplete capability to help you work with VBA/macro coding within Word by guiding you through syntax and usage
choices, or the MS Visual C# 'word processing' code editor (IDE) specializes in working with that code
http://msdn2.microsoft.com/en-us/library/ms228282.aspx.

Word can give you the look of plain text and you can supplement it with macros and add-ins to have it 'turn off as you go' the
features that would let you copy, paste, type in full Word document text feature support, but you sort of have to always 'look over
your shoulder' to watch to see that neither you or Word are trying to 'revert' to using a Word feature that isn't really tuned to
the plain text or code that you're working on g. It's easy to slip by just 'reaching up' and clicking on one of Words 'handy'
icons that you're used to using

=============
"Jay Douglas" wrote in message ...
Well, like you said, you can save Word files as text files. You can open
text files with word. When opening a text file from word, copy/paste copies
the actual text as text. When you copy a text from the native word format,
it copies the embedded word markup.

A couple of scenarios, say I create a document with the default template and
copy paste the contents into dreamweaver, it copies all the word mark up
with the text.

If I open a text file with word, and copy paste it into dreamweaver, it just
copies the text.

I was wondering if there was a way to create a word template (.dot) file
that uses text as the default format and then have word open this word
template by using a command switch. A possible pseudo command line would
be:

winword.exe /template:textformat.dot

Now, word would be acting as a text editor per say. I could have all the
Word functionality such as spell check, C# code w/ office objects, etc.

I could use this functionality for a ton of different things, not just
copy/paste for dreamweaver.

Does this make any sense?

Thanks,
Jay
--
Let us know if this helped you,

Bob Buckland ?:-)
MS Office System Products MVP

*Courtesy is not expensive and can pay big dividends*

For Everyday MS Office tips to "use right away" -
http://microsoft.com/events/series/a...andtricks.mspx