Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-15-2015, 03:50 AM
milena milena is offline Populating a table cell wit document properties Windows 7 64bit Populating a table cell wit document properties Office 2013
Novice
Populating a table cell wit document properties
 
Join Date: Apr 2015
Posts: 4
milena is on a distinguished road
Default Populating a table cell wit document properties

Hello!

I've got a macro that adds rows to a table, but I need it to populate the rows with a document properties and I can't find a syntax that would work.
That's what I have so far:


Code:
Sub add()

Dim oTable As Table
Dim oCell As Cell
Dim oPrevRow As Row, oNewRow As Row
Dim iColumn As Long

' Insert new row
Set oTable = ActiveDocument.Tables(1)
Set oPrevRow = oTable.Rows(oTable.Rows.Count)
oTable.Rows.add
Set oNewRow = oTable.Rows(oTable.Rows.Count)
oNewRow.Cells(1).Range.Text = "Column 1 Text"
oNewRow.Cells(2).Range.Text = "Column 2 Text"
oNewRow.Cells(3).Range.Text = "Column 3 Text"
oNewRow.Cells(4).Range.Text = "Column 4 Text"
oNewRow.Cells(5).Range.Text = "Column 5 Text"
End Sub
So is there a way to replace "Column Text" string with a document property?
Reply With Quote
 

Tags
document properties, table



Similar Threads
Thread Thread Starter Forum Replies Last Post
Populating a table cell wit document properties Move table cell contents from one table to another table or cell in same table donaldadams1951 Word VBA 4 02-04-2015 03:54 PM
Populating a table cell wit document properties Cell properties: next cell htieK Excel 5 10-28-2014 06:23 PM
Populating a table cell wit document properties Updating Document Properties without using advanced properties dialogue thedr9wningman Word VBA 3 01-20-2014 05:56 PM
Populating a table cell wit document properties How 2 Save Table Properties & Apply to other table Popeye.Tom Word Tables 1 04-24-2013 09:44 PM
Properties of a Cell DrDOS Excel 1 04-06-2012 08:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:45 PM.


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