 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
gimpalimpa
Joined: 04 Apr 2008 Posts: 3
|
Posted: Fri Apr 04, 2008 11:41 pm Post subject: Insterting page breaks into MSWord. |
|
|
I've started becoming rather proficient with AutoHotkey, but I'm having troubles getting a page break into MSWord.
The situation is as follows, I am taking a block text from a .txt document and fileappending it straight to a .doc file which I create using AHK. While this works for one block of text, I would like this to be looped for many blocks of text that are separated by a new page.
I have tried using AHK to open the document in word, read a block of text, send the block of text, then send ^{enter}, and manually break the page. While I get all the text (except for the # sign...which is confusing, but oh well), I lose a bit of the formating I wish to keep. Some of the text is indented and some is not. Using the Send command with FileRead or a Read_Line loop just is not preserving the indentations that I need.
I've been racking my brain, and I can't seem to come up with a solution that doesn't involve me learning how to write a printer driver. |
|
| Back to top |
|
 |
gimpalimpa
Joined: 04 Apr 2008 Posts: 3
|
Posted: Sat Apr 12, 2008 7:27 pm Post subject: |
|
|
| One bump, then I'll let this die. |
|
| Back to top |
|
 |
edu
Joined: 12 Oct 2006 Posts: 88 Location: Canada
|
Posted: Sat Apr 12, 2008 8:04 pm Post subject: |
|
|
You could give more details on what you're doing. As far as I know, AHK cannot create a MS Word file. It can create a file with the extension *.doc, but it is simply a plain text file.
One solution would be to study a little bit of the Rtf specs. and find out what code it uses to represent a page break, then append that code in all new text you insert in you *.rtf file.
Rtf is a plain text file not a binary like ms word doc. So manipulating text becomes easy.
I hope this helps, I'm very limited in my autohotkey skills to help you more. _________________ The best things of life are free. |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|