Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > Pro VB 6
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
Pro VB 6 For advanced Visual Basic coders working in version 6 (not .NET). Beginning-level questions will be redirected to other forums, including Beginning VB 6.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro VB 6 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 12th, 2004, 12:16 AM
Registered User
 
Join Date: Mar 2004
Location: Bangalore, Karnataka, India.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Copy word to word doc. in VB

Hi,

Can u help me please...

I have a doubt in VB.

I need to copy an object(b/w a start label and an end label) from an existing word document to a new word document. All this should be done in VB. (invoked from VB)

It works fine when both the start and end labels are present in the same page of the word. But fails when the end label is present on a different page.

It's really urgent. Can u please give me the code for the above problem?

bye,
vamshi

Reply With Quote
  #2 (permalink)  
Old March 24th, 2004, 06:25 PM
Authorized User
 
Join Date: Jul 2003
Location: Montreal, , .
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi.

Here is a code to add all documents from the listbox lsDocuments:

Dim m_OWordDoc As Word.Document

For intI = 1 To lsDocuments.ListItems.Count
                 m_OWordDoc.Application.Selection.InsertFile fileName:=lsDocuments.ListItems(intI).Text
         m_OWordDoc.Application.Selection.InsertParagraph After
     m_OWordDoc.Application.Selection.EndKey unit:=wdStory

Next
Pavel
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how can i get vb printer.print code for a word doc choudhry.usman Word VBA 1 March 6th, 2008 10:46 PM
Creating word doc - word behaviour mat41 Classic ASP Professional 2 April 29th, 2007 06:46 PM
Copy text from 1 doc to other doc thru vba in word itchock Word VBA 2 December 29th, 2006 02:47 AM
Copy contents of Word doc & Paste in Excel - How?? robear Javascript How-To 1 August 23rd, 2006 03:22 PM
How to Copy contents of Word doc & Paste in Excel robear Pro PHP 0 August 21st, 2006 12:25 PM



All times are GMT -4. The time now is 08:09 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.