Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-29-2022, 11:17 PM
balavaka balavaka is offline Insert Table with Tags Windows 10 Insert Table with Tags Office 2013
Novice
Insert Table with Tags
 
Join Date: May 2021
Posts: 17
balavaka is on a distinguished road
Default Insert Table with Tags

Insert Tables with Tags (while insert Table input box for rows and columns)

Sample file attached.
Attached Files
File Type: docx Sample_Tables with Tags.docx (11.6 KB, 8 views)
Reply With Quote
  #2  
Old 10-30-2022, 05:57 AM
macropod's Avatar
macropod macropod is offline Insert Table with Tags Windows 10 Insert Table with Tags Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,861
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

Your post lacks detail. It's impossible to know from what little you've posted how this might be automated.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 10-30-2022, 06:04 AM
balavaka balavaka is offline Insert Table with Tags Windows 10 Insert Table with Tags Office 2013
Novice
Insert Table with Tags
 
Join Date: May 2021
Posts: 17
balavaka is on a distinguished road
Default

if 2row 2column table

first row & column with tag <2FG>
last row with <LLA>(a) for first column and second column (b)

if 4row 2column table and 6row 2column table
first row & column with tag <4FG>

second, fourth row with <MLA> (a, b, c, etc.)

last low with <LLA> (a, b, c, etc.)
Reply With Quote
  #4  
Old 11-09-2022, 05:18 AM
balavaka balavaka is offline Insert Table with Tags Windows 10 Insert Table with Tags Office 2013
Novice
Insert Table with Tags
 
Join Date: May 2021
Posts: 17
balavaka is on a distinguished road
Default

Can anyone help me on this i have lot of tables. Kindly help me.
Reply With Quote
  #5  
Old 11-21-2022, 03:16 PM
macropod's Avatar
macropod macropod is offline Insert Table with Tags Windows 10 Insert Table with Tags Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,861
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

What you want to do can't be done via the Insert Table dialogue box. You would need a separate macro to populate the table after you've created it. Alternatively, you could use a macro to both create and populate the table. The following macro takes the latter approach
Code:
Sub AddTable()
Application.ScreenUpdating = False
Dim StrNum As String, NumRows As Long, oTbl As Table, r As Long
StrNum = InputBox("How Many Pairs of Rows?")
If IsNumeric(StrNum) = False Then Exit Sub
NumRows = CLng(StrNum) * 2
Set oTbl = Selection.Tables.Add(Range:=Selection.Range, NumRows:=NumRows, NumColumns:=2)
With oTbl
  .Borders.Enable = True
  With .Range.ParagraphFormat
    .SpaceBefore = 0
    .SpaceAfter = 0
  End With
  If NumRows = 2 Then
    .Cell(1, 1).Range.Text = "<2FG>"
    .Cell(1, 2).Range.Text = "<2FG>"
    .Cell(2, 1).Range.Text = "<LLA>(a)"
    .Cell(2, 2).Range.Text = "<LLA>(b)"
  Else
    For r = 1 To NumRows Step 2
      .Cell(r, 1).Range.Text = "<4FG>"
      .Cell(r, 2).Range.Text = "<4FG>"
      .Cell(r + 1, 1).Range.Text = "<LLA>(" & Chr(96 + r) & ")"
      .Cell(r + 1, 2).Range.Text = "<LLA>(" & Chr(97 + r) & ")"
    Next
  End If
End With
Application.ScreenUpdating = True
End Sub
For PC macro installation & usage instructions, see: Installing Macros.
For Mac macro installation & usage instructions, see: Word:mac - Install a Macro.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding a table to a template, need the table to autosize or insert row if necessary tcoia Publisher 0 03-24-2020 11:06 AM
VBA coding to insert a word table using quickparts and insert table menu Dont know Word VBA 3 02-12-2020 09:51 AM
Insert Table with Tags Unknown tags / labels in Word table ganning Word Tables 2 11-02-2017 12:17 PM
Search and replace/insert HTML code into Master File using tags dave8555 Excel 2 02-23-2014 03:51 PM
Insert table in document - automatically updates second table in summary? Mechanic Word 2 08-01-2012 09:44 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:54 AM.


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