Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-09-2014, 06:28 PM
VBLearner VBLearner is offline VBA Code to take data from a table in word document and place it in a summary table Windows 8 VBA Code to take data from a table in word document and place it in a summary table Office 2010 64bit
Novice
VBA Code to take data from a table in word document and place it in a summary table
 
Join Date: Mar 2014
Posts: 1
VBLearner is on a distinguished road
Default VBA Code to take data from a table in word document and place it in a summary table


This is in the same document. I tried to record the code, but I keep getting an error saying "value out of range". I essentially want to take a revision date from a certain part of a table and copy and paste it to a summary table in the same document.

This is what I tried:

Code:
Sub Copy_To_Index()
'
' Copy_To_Index Macro
'
'
    Selection.MoveLeft Unit:=wdCharacter, Count:=16, Extend:=wdExtend
    Selection.Copy
    ActiveWindow.ActivePane.VerticalPercentScrolled = -40
    Selection.MoveUp Unit:=wdLine, Count:=165
    Selection.MoveDown Unit:=wdLine, Count:=4
    Selection.MoveUp Unit:=wdLine, Count:=1
    Selection.MoveRight Unit:=wdCharacter, Count:=3
    Selection.PasteAndFormat (wdFormatPlainText)
End Sub
Thanks for any help!
Reply With Quote
  #2  
Old 03-09-2014, 08:42 PM
macropod's Avatar
macropod macropod is offline VBA Code to take data from a table in word document and place it in a summary table Windows 7 32bit VBA Code to take data from a table in word document and place it in a summary table Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Evidently your document has more than one table. Which table in the document are you:
• copying from
• copying to?
For each of those tables, what is the cell address you're:
• copying from
• copying to?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert table in document - automatically updates second table in summary? Mechanic Word 2 08-01-2012 09:44 PM
VBA Code to take data from a table in word document and place it in a summary table Place table over image as background vavs Outlook 1 08-15-2011 09:32 AM
VBA Code to take data from a table in word document and place it in a summary table adding table to a particular place hklein Word VBA 2 07-25-2011 01:45 AM
VBA Code to take data from a table in word document and place it in a summary table How do I dynamically update data in a Word Document from a database table RSchmidt Word 1 07-14-2011 04:27 PM
VBA Code to take data from a table in word document and place it in a summary table Excel data to Word table Jaymond Flurrie Word VBA 2 02-27-2011 07:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:04 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft