AutoHotkey Community

It is currently May 26th, 2012, 9:05 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: June 30th, 2009, 10:49 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Does anybody know where I can get to the code (source) of a page in "MS Word"?

For example, I have a page in "Word" with this simple text in it - only one sentence, actually:

A kitten goes outside.

As you can see, all the words are in different colors. Where is the code that regulates that? Is there any way to create "Word" pages in that original code (like creating web-pages in HTML code)? If you know it, would you please tell me where in the "MS Word"I could get my page's code and where I could type in such code to produce other "MS Word" pages (documents). Thank YOU.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 11:01 am 
Offline

Joined: June 3rd, 2008, 6:44 pm
Posts: 27
I don't know anything about .doc structure, but the new .docx files (Office 2007) are basically zipped XML files. Also, you can export .doc files to RTF and edit its source code.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 11:11 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
ArchCarrier wrote:
... but the new .docx files (Office 2007) are basically zipped XML files.
Can You please tell me how I can get a .docx file of my page?


ArchCarrier wrote:
Also, you can export .doc files to RTF and edit its source code.
What is RTF and how do I export files into there?

I am sorry, I am quite ignorant in this field.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 11:49 am 
Offline

Joined: June 3rd, 2008, 6:44 pm
Posts: 27
You can save files as .docx only if you have Office 2007, but you can export to RTF through the Save As... function in the File menu.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 12:11 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
I see. Thank You.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 12:40 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
I don't know why, but I can't save my "Word" page as an RTF file using "Save As" - it gets saved as a normal "Word" file.
Is there any other way to do it?
What is the extension of RTF files? Is it .rtf?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 12:45 pm 
Offline

Joined: June 3rd, 2008, 6:44 pm
Posts: 27
I use OpenOffice myself so I have to do it from memory, but isn't there an option in the Save As dialog that lets you pick the format? RTF stands for Rich Text Format, maybe it's written out like that?


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 1:04 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
ArchCarrier wrote:
...but isn't there an option in the Save As dialog that lets you pick the format?
yes, there is that option
ArchCarrier wrote:
RTF stands for Rich Text Format, maybe it's written out like that?
and there is RTF format there, but when I choose it and click it, the file gets saved as an ordinary "Word" file and the .rtf extension doesn't show up in the file's name. When I open the saved file - it is just a usual "Word" file.

Wiki says that RTF code may look like the following (example):

{\rtf1\ansi{\fonttbl\f0\fswiss Helvetica;}\f0\pard
This is some {\b bold} text.\par}


but it's not what I get. I just get a "Word" document.


Last edited by Benny-D on June 30th, 2009, 1:08 pm, edited 1 time in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 1:08 pm 
Offline

Joined: June 3rd, 2008, 6:44 pm
Posts: 27
Maybe someone who actually uses MS Word can answer this? :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 1:09 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Sure. Thanks for Your help anyway.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 30th, 2009, 1:52 pm 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
Bingo!!!!!!!

At last I got what the problem was - it turned out that I DID save the "Word" document as an RTF file, but I was still opening it with the "Word" application (which is a default one on my computer) - that's why it came out as a "Word" file again. However, when I changed the default application from "MS Word" to "Notepad", I finally got the RTF file with the source code of my "Word" page!!!!!

The RTF files don't seem to have a special and unique icon or a necessary .rtf extension in their name - at least I didn't observe that in my case - that’s why I was confused and took an RTF file for a "Word".

I also found this web-page where someone is trying to learn RTF code by trial and error - a very helpful resource to me as I am also about to try the same thing.

Anyway, ArchCarrier, thank You very much. You have provided me with a wonderful idea and in fact You HAVE answered my question! (Before Your first post in this thread I didn't even know about RTF's existence!)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: July 1st, 2009, 7:48 am 
Text format details of MS-Word docs are saved within the lines EndOfLine (EOL) character. AFAIK.


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: July 2nd, 2009, 2:33 am 
Offline

Joined: February 29th, 2008, 12:11 pm
Posts: 943
BoBo³ wrote:
Text format details of MS-Word docs are saved within the lines EndOfLine (EOL) character

What is "EndOfLine character" and how can I look into it?


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Morpheus, Ragnar and 3 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group