obscurant1st 1 Posted April 18, 2010 Hi, I have two word files which i have to combine one after the other, it is containing lots of formatting and all. Sohow can i use auto it for combining both. Is there any UDFs for this? also I need to include Page Breaks after some predefined words. [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc. Share this post Link to post Share on other sites
BugFix 43 Posted April 18, 2010 Hi,I have two word files What you mean - two MS Word documents? Best Regards BugFix Share this post Link to post Share on other sites
obscurant1st 1 Posted April 18, 2010 What you mean - two MS Word documents?ooops, I am sorry.Yeah I mean two MS word Documents!! [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc. Share this post Link to post Share on other sites
BugFix 43 Posted April 18, 2010 (edited) OK, this works so: #include <Word.au3> $sPath1 = "file1.doc" $sPath2 = "file2.doc" $oWord = _WordCreate($sPath1, 0, 1) ; visible With $oWord.Selection .EndKey(6) .InsertBreak(7) .InsertFile($sPath2) EndWith Edit: Best way to find out this: Make an macro in word, that this things do, than open VBA and translate this to autoit-code. Edited April 18, 2010 by BugFix Best Regards BugFix Share this post Link to post Share on other sites
obscurant1st 1 Posted April 18, 2010 thx man, that helps a lot. [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc. Share this post Link to post Share on other sites
obscurant1st 1 Posted April 21, 2010 will this work with .docx format also? coz i am getting an error like : ==> The requested action with this object has failed.: $o_doc = $o_object.Documents.Open ($s_FilePath, $f_ConfirmConversions, $f_ReadOnly, $f_AddToRecentFiles, $s_PasswordDocument, "", $f_Revert, $s_WritePasswordDocument, "", $i_Format) $o_doc = $o_object.Documents.Open ($s_FilePath, $f_ConfirmConversions, $f_ReadOnly, $f_AddToRecentFiles, $s_PasswordDocument, "", $f_Revert, $s_WritePasswordDocument, "", $i_Format)^ ERROR [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc. Share this post Link to post Share on other sites
big_daddy 20 Posted April 21, 2010 Add this toward the top of your script. _WordErrorHandlerRegister() Share this post Link to post Share on other sites
obscurant1st 1 Posted April 22, 2010 >Running:(3.3.6.1):C:\Program Files\AutoIt3\autoit3.exe "C:\Documents and Settings\oDx\Desktop\Macro\test.au3" C:\Program Files\AutoIt3\Include\Word.au3 (1293) : ==> Variable used without being declared.: Return SetError($_WordStatus_Success, 0, 1) Return SetError(^ ERROR then this error comes!! [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc. Share this post Link to post Share on other sites
obscurant1st 1 Posted April 24, 2010 (edited) sorry for the double post, but i really need some help here, pls!! :| Edit: solved I had to give "_WordErrorHandlerRegister()" after header file, i wax giving it the begining! thanks!!! Edited April 24, 2010 by obscurant1st [u]We don't need people who can spit back facts. We've got Google."[/u] WebguruBB - Free Hosting, Domains, and SEO articles.Awesome Techs - Tips, Tricks and Some Technology NewsCool Facts - Cool Facts, Fun Facts, Weird Facts etc. Share this post Link to post Share on other sites