Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Copy data - Multiple Word Pages to Excel

I want copy data in word document (multiple pages copy like pages 3 to
10) and paste it to excel.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 621
Default Copy data - Multiple Word Pages to Excel

What is preventing you from doing that?


Gord

On Fri, 30 Dec 2011 18:48:28 -0800 (PST), Raghu
wrote:

I want copy data in word document (multiple pages copy like pages 3 to
10) and paste it to excel.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 538
Default Copy data - Multiple Word Pages to Excel

Gord Dibben wrote:

On Fri, 30 Dec 2011 18:48:28 -0800 (PST), Raghu
wrote:

I want copy data in word document (multiple pages copy like pages 3 to
10) and paste it to excel.


What is preventing you from doing that?


In other words, Raghu: can you be more specific with the description of your
problem?

--
You were never paranoid... until they started coming after you.
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Copy data - Multiple Word Pages to Excel

Sorry for the confusion...

Here is the problem - I have word document which is having data for
more 200 pages. I need a macro in excel which should copy data from
pages 100 - 150 from word file and paste it in Excel (Sheet1).
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Copy data - Multiple Word Pages to Excel

Hi all

I got the sollution :). Please let me know, if you have easy way.

Sub NewMacro()
Dim WdApp As Word.Application 'Word Application
Dim WdDoc As Word.Document 'Word Document
Dim rgePages As Word.Range
Dim StartPageNum As Double
Dim EndPageNum As Double

StartPageNum = 100
EndPageNum = 150

On Error Resume Next
Set WdApp = GetObject(, "Word.application")
If Err.Number < 0 Then
Set WdApp = CreateObject("Word.application")
End If
On Error GoTo 0

On Error Resume Next
Set WdDoc = WdApp.Documents("File Name") 'Please change your file name
If Err.Number < 0 Then
Set WdDoc = WdApp.Documents.Open("C:\File Name") 'Please change your
file name and path
End If

WdApp.Documents(WdDoc).Activate
WdApp.Visible = True

WdApp.Selection.Goto what:=wdGoToPage, which:=wdGoToAbsolute,
Count:=20
Set rgePages = WdApp.Selection.Range
WdApp.Selection.Goto what:=wdGoToPage, which:=wdGoToAbsolute,
Count:=40
rgePages.End = WdApp.Selection.Bookmarks("\Page").Range.End
rgePages.Select
End Sub
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copy/Paste Multiple cells from Excel to Word lo_rah via OfficeKB.com Excel Programming 0 February 14th 08 08:29 PM
using excel data to create multiple web pages [email protected] Excel Programming 1 January 2nd 08 11:02 PM
How do I import a word doc, multiple pages, into Excel cell? Stonewall Excel Discussion (Misc queries) 1 May 31st 07 10:00 PM
How do I import a word doc, multiple pages, into Excel cell? Sharkpod Excel Discussion (Misc queries) 4 April 18th 07 10:16 PM
Copy Excel to Word - Multiple Pages Yvonne New Users to Excel 1 February 17th 07 01:01 AM


All times are GMT +1. The time now is 05:15 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"