Word 2007 Macro in MS-Insert Document

General Macro Scheduler discussion

Moderators: JRL, Dorian (MJT support)

Post Reply
armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Word 2007 Macro in MS-Insert Document

Post by armsys » Sun Mar 15, 2009 6:55 am

I need your help to add Word functionalities entirely in a MS script:
Objective: Insert a document (b.docx) into an active Word document (a.docx)
A.docx is already opened and an active Word document.
B.docx isn't opened and is stored in c:\Temp folder.
1. SetFocus>a.docx* ("active document");
2. Go to the end of the active document;
3. Insert a NEXT PAGE section break;
4. Set Link to Previous (header/footer) to FALSE after the NEXT PAGE section break;
5. Insert b.docx after the NEXT PAGE section break.
Is it possible to carry out the above steps in a MS script? Thanks a lot.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sun Mar 15, 2009 8:08 pm

I would record that process in Word and then convert the VBA it produces into VBScript:

http://www.mjtnet.com/blog/2008/04/28/c ... -vbscript/
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

armsys
Automation Wizard
Posts: 1108
Joined: Wed Dec 04, 2002 10:28 am
Location: Hong Kong

Post by armsys » Sun Mar 15, 2009 11:22 pm

marcus,

Thanks for offering a helpful link. I have already done it successfully without the VBA/VBScript things simply by keyboard simulations thru Macro Scheduler. That's the big advantage of the Macro Scheduler. Nonetheless, I'll progressively translate my keyboard simulations in VBA/VBscript commands.
Thanks a lot for your help.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts