Pages in an Word Dokument

Hello Folks, I have following Problem: I open an Word .dor via Automation and past some stuff in it. Okay no problem. But my dot is 11 Page long and the pasted arguments need sometimes 2 Pages sometime 5 Pages. So how can i delete the “emty” 9 or 6 Pages ?! Which was not needed ?! Which command must i use ?! Thank you for you help … ------------ Best regards Alejandro Schubert schubert@dolphinct.de

Alex, Why is tht .dot 11 pages long? To me it looks like you defined 9 pages of placeholders to be prepared for the worst case but usually you won’t need them, correct? You have two options: 1) Fields in Word Docs have an option something like “Don’t print if empty”. Setting this option to True in every field might already solve your problem. 2) Instead of defining pages and pages of fields, you might decide to add only ONE line of fields (I assume that you want to print something like a table) and dynamically add lines when needed. Hope this helps Marcus Marcus Fabian phone: +41 79 4397872 m.fabian@thenet.ch

Hello Alex, maybe you should record a macro in word, while you are typing right commands. In that case you find the right command, you can read the right syntax in the recorded word-macro. Maybe you´ll find this way the answer. Stephan Fehrmann BEST GmbH stephan.fehrmann@bestcolor.com

Thanks for your quik answer. i think a Word Marco in the Word dot is the best solution. But where can i find some source code, but i am not so fit in writing VB Marcos :wink: ------------ Best regards Alejandro Schubert schubert@dolphinct.de

Hi Alex, that´s simple. The makro will do it for you. I mean you start recording a macro. Then you do the actions you want to see as macro-code. After this you stop recording the macro. In the macro you find the action you have done translated in vb. Stephan Fehrmann BEST GmbH stephan.fehrmann@bestcolor.com