Mavila
02-22-2016, 07:04 PM
I select the shape using:
ActiveDocument.Sections(ActiveDocument.Sections.Count).Footers(wdHeaderFoot erFirstPage).Range.ShapeRange(1).Select
If there's no table, I add one and enter text, etc.
If a table exists already, I can't seem to find a way to add text to cell(1,1), for example.
I've used the following and variations thereof:
Selection.ShapeRange.TextFrame.TextRange.Tables(1).Cell(1, 1).Range = "Text"
Selection.ShapeRange(1).TextFrame.TextRange.Tables(1).Cell(1, 1).Range = "Text" (works on the shape in the header, first one in the section I guess)
I've tried Set objShape = Selection and then:
objShape.TextFrame.TextRange.Tables(1).Cell(1, 1).Range = "Text"
I've tried selection the first paragraph in the shape thinking that would get the cursor into the first cell, but that doesn't seem to work either.
Any ideas?
ActiveDocument.Sections(ActiveDocument.Sections.Count).Footers(wdHeaderFoot erFirstPage).Range.ShapeRange(1).Select
If there's no table, I add one and enter text, etc.
If a table exists already, I can't seem to find a way to add text to cell(1,1), for example.
I've used the following and variations thereof:
Selection.ShapeRange.TextFrame.TextRange.Tables(1).Cell(1, 1).Range = "Text"
Selection.ShapeRange(1).TextFrame.TextRange.Tables(1).Cell(1, 1).Range = "Text" (works on the shape in the header, first one in the section I guess)
I've tried Set objShape = Selection and then:
objShape.TextFrame.TextRange.Tables(1).Cell(1, 1).Range = "Text"
I've tried selection the first paragraph in the shape thinking that would get the cursor into the first cell, but that doesn't seem to work either.
Any ideas?