Adding 2nd document

T

Tim

In an application i can open a specific document through code (VB.NET). How
would i then add pages to that document without creating another document
or, if i have to create a document, how to then copy the text on that
document, paste it at the end of the other document, and then close that
document(not the one first created but the second)

Thanks
TIm
 
C

Cindy M -WordMVP-

Hi Tim,
In an application i can open a specific document through code (VB.NET). How
would i then add pages to that document without creating another document
or, if i have to create a document, how to then copy the text on that
document, paste it at the end of the other document, and then close that
document(not the one first created but the second)
In case you hadn't noticed, this group handles end-user questions, not
developer questions. And office.developer or word.vba group would be more
appropriate.

Word is a word processor: it adds pages as you add text, automatically. To
force a page break, you can use the InsertBreak method, with the appropriate
parameter. Or insert a Chr$(12) character.

Seeing as how you're SO new to Word and its object model, I recommend you play
around a bit in the user interface, to discover how to accomplish simple tasks
in it, then record performing the tasks in a macro (Tools/Macro). You can't use
the macro 1:1 in your .NET app, but it will point you to the objects, methods
and properties you need to work with.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top