15 posts in this topic
Merge word documents
Firstly, thanks for your help in the past.
I have a new activity I need to accomplish.
* need to read a cell in excel (containing a file name)
* open the file name in word (as its a word document
*copy the word document
*paste the word document into the master document
*read next cell in excel
... and repeat until you reach the bottom of the column.
I can read cells open workbooks etc.
But as far as copying and pasting in word - where is the best place to start, and what functions should I be looking at. Or even if autoit is the right system to use?
How to make a newline in Word with COM
Hi all (Especially @water)
I wonder how to do this task in word from autoit.
Assume that i pasted some text into word with this code.
Local $oWord = ObjGet("","Word.Application") Local $wRangeObj = _Word_DocRangeSet($oWord, 0) Local $data = ClipGet() $wRangeObj.Text = $data $wRangeObj.Font.Bold = True So far so good. Now, i need to enter a new line in word and turn the Font.Bold = False.
Currently, i did it with activating the word window and Send() function. But i would like to do it with the help of COM object. How can i do that ?
Cannot save word document - Strange/Unknown error
Hello, I am trying to save an word document but it won't work , This is my REALLY simple script:
#include <Word.au3> Global $oWord = _Word_Create(False, True) _Word_DocSaveAs($oWord) MsgBox(0, @error, @extended) And my MsgBox:
I know that its a COM error because @error is set 2... but what about the COM error code? I cannot find anything related to -2147352570!
Opening word in background
I'm trying to open a document with _WordDocOpen and replace some text in it with _Word_DocFindReplace and then print with _Word_DocPrint and finally close with _Word_DocClose and kill word with _Word_Quit. Works perfectly.
My question is (can't find an answer anywhere): Can i do those commands in the background so i don't see word opening and replacing everything? Can't find anything in the proprieties of "WordDocOpen".
Wordperfect conversion to Word
Trying to find a quick way to convert 30k+ WordPerfect files into Word.
Will probably run it locally from an admin machine or server so user permissions won't affect it.
My idea was just to open the file, select all, copy, open new word doc, paste, file, save....
What would be the best way to go about scripting something in this way?