Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-05-2019, 08:57 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default Adding the table reference

Hi,

I am new to word VB scripts.


I have a document with the tables, and i want to select some tables only. And each table is in the following format attached (input).
The output needs to be in the format (output) attached.

Regards
Pri
Attached Files
File Type: docx input.docx (14.3 KB, 11 views)
File Type: docx output.docx (13.4 KB, 11 views)
Reply With Quote
  #2  
Old 04-05-2019, 01:00 PM
Charles Kenyon Charles Kenyon is online now Adding the table reference Windows 10 Adding the table reference Office 2016
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,082
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

Referencing tables in vba:
ActiveDocument.Tables(1) = 1st table in document
Reply With Quote
  #3  
Old 04-08-2019, 09:36 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

@Charles Kenyon: Could you elaborate please.
I am new to vba
Reply With Quote
  #4  
Old 04-08-2019, 10:17 AM
gmaxey gmaxey is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Expert
 
Join Date: May 2010
Location: Brasstown, NC
Posts: 1,421
gmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the roughgmaxey is a jewel in the rough
Default

Before any of us can effectively elaborate, you are going to have to elaborate first.

What specifically are you trying to do?
__________________
Greg Maxey
Please visit my web site at http://www.gregmaxey.com/
Reply With Quote
  #5  
Old 04-11-2019, 02:55 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

I have document with tables in section 9.2 And a section 9.3, with elements of table.
I want to fill the tables with the IEs in the tables of section 9.3

Lets say, in table 9.2.2.1, the "Message Type" IE has "IE type and reference" to 9.3.1.1. So i want to
fill that from 9.3.1.1. If any fields in 9.3.1.1, have any other IEs and reference also needs to be filled.
But lets say field "Bearer Context Status Change" doesnot have any "IE type and reference" , is just that field.

And in the output, i am just interested in first two columns only.

The fields (Information Element) are specified in section 9.3. The fields within these also can be nested.
e.g 4th row of table 9.3.1.3 "Criticality Diagnostics" refers to 9.3.1.53. So this again needs to be
filled accordingly.

I have manually filled these for messages in section 9.2.1. I want to automate with script, so easier when spec
version changes.
Reply With Quote
  #6  
Old 04-11-2019, 03:30 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

The table in E1output is manually filled for all messages of section 9.2.2.
I want to automate for filling in same way for 9.2.1.
And also automation/script helps if any changes in fields, in later version of specs

Note: im interested in filling only first two columns. some Ies in second column of my
manual example is missing, it is because of my mistake.

E1input is split into 5 files, as total file size exceeds the limit
Attached Files
File Type: doc E1input1.doc (250.5 KB, 8 views)
File Type: doc E1input2.doc (406.5 KB, 4 views)
File Type: doc E1input3.doc (380.5 KB, 4 views)
File Type: doc E1input4.doc (407.0 KB, 4 views)
File Type: doc E1input5.doc (78.5 KB, 4 views)

Last edited by pri; 04-11-2019 at 03:33 AM. Reason: corrected mistakes
Reply With Quote
  #7  
Old 04-11-2019, 03:31 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

Sorry the output file couldnot be attached
Attached Files
File Type: docx E1output.docx (69.1 KB, 5 views)
Reply With Quote
  #8  
Old 04-11-2019, 03:58 PM
macropod's Avatar
macropod macropod is offline Adding the table reference Windows 7 64bit Adding the table reference 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

Cross-posted at: http://www.vbaexpress.com/forum/show...g-nested-table
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 04-12-2019, 04:48 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

Hello,
I understand i posted two places, but at least keep one thread free from comments, as i need help urgently. Hope you understand
Thanks for your support
Priya
Reply With Quote
  #10  
Old 04-16-2019, 07:17 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

Is there any inputs to this, will be helpful..i am not vba programmer, but plain old embeeded c programmer..want to use vba to create design document..
Reply With Quote
  #11  
Old 04-16-2019, 06:47 PM
Guessed's Avatar
Guessed Guessed is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,932
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Priya

It appears people are not interested in replying because the question you have raised is complex and we don't think we would learn much in doing your work for you. I believe you would have more luck if you broke this down into smaller chunks and made some initial attempts at modifying existing code you can find on this and other forums that could be adapted. Post those attempts at smaller pieces of the puzzle and I'm pretty sure people would step up and help out.

You haven't specified where all these input and output documents are coming from - how does the macro determine what are the input docs and where is the output doc? Are all these documents already open or do they get opened/closed by the macro.

Once you have the relevant input/output documents sorted, how do you identify the relevant source and target tables? Then how do you identify the relevant cells? Are you replacing the entire cell to the target cell or appending text?

What is the iteration process for the subsequent input docs?
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #12  
Old 04-17-2019, 12:36 AM
pri pri is offline Adding the table reference Windows 10 Adding the table reference Office 2016
Novice
Adding the table reference
 
Join Date: Apr 2019
Posts: 8
pri is on a distinguished road
Default

@Guessed and macropod, could you delete this thread. I tried and unable to.

To make it clear my work is not to come up with the script. My work is requirements gathering and as part of this, everytime specs changes, i need to update some excel sheet. So it is easier for me if i have the script handy.

So could you kindly delete this thread
Reply With Quote
Reply

Tags
word macros

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding the table reference Adding reference to Office 12 Object Library to jag_man653 Excel Programming 11 02-20-2018 03:31 PM
How to reference more than one table in a Word doc scootermac315 Word VBA 5 06-22-2015 05:28 PM
Adding the table reference Create updating reference in table droseman Word 1 09-05-2014 05:39 PM
Using reference table BritBiker2 Excel 3 02-23-2013 05:27 AM
Adding additional job/education/reference category boxes in resume template? Audible Nectar Word 1 11-16-2012 01:16 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:36 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