Write text in table within textbox placed in pagefood

P

pmm

Hi

I have a problem with a table/texbox object placed in pagefood. Se the
description and code here:

'-------------------------------------------------------------------------
' WANT: Replace existing text with new text - format it - in the
pagefood,
' and the text shall be place in a table there is place in a
textbox
' (there are already added a textbox and inside this a table:
' one row and one coloum).
' COMMENT:
' It works fine when the texbox and table are placed on the page
' PROBLEM:
' It can't find the shape in pagefood, and I don't know how to
get it.
' (it shall be a shape and not at frame)
'-------------------------------------------------------------------------
Sub ReplaceText_TableTextbox()

Dim txt_adress As Range

With ActiveDocument

Set txt_adress = .Shapes(1).TextFrame.TextRange

txt_adress.Tables(1).Cell(1, 1).Range.Delete
txt_adress.Tables(1).Cell(1, 1).Range = "This is the first line"
txt_adress.Tables(1).Cell(1, 1).Range.InsertParagraphAfter
txt_adress.Tables(1).Cell(1, 1).Range.InsertAfter "This is the
second line"
txt_adress.Tables(1).Cell(1, 1).Range.InsertParagraphAfter
txt_adress.Tables(1).Cell(1, 1).Range.InsertAfter "This is the last
line"

'Line 1: Bold and spaceafter 10
txt_adress.Paragraphs(1).Range.Bold = True
txt_adress.Paragraphs(1).Range.ParagraphFormat.SpaceAfter = 10
'Line 2: Font size 16
txt_adress.Paragraphs(2).Range.Font.Size = 16

End With

End Sub
 
S

Suzanne S. Barnhill

I suspect you may have used Babelfish or some other online machine
translator, as the term "pagefood" is meaningless to me. Are you referring
to the footer?
 
P

pmm

I suspect you may have used Babelfish or some other online machine
translator, as the term "pagefood" is meaningless to me. Are you referring
to the footer?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA















- Vis tekst i anførselstegn -

Hi - ofcurse, not pagefood but pagefooter
 
S

Suzanne S. Barnhill

Since you're using VBA for this, you'll probably get better help if you post
in one of the VBA NGs (such as microsoft.public.word.vba.general). This
newsgroup is the one currently being used for "general questions," so it
attracts mostly questions from end users and those who support them.

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

I suspect you may have used Babelfish or some other online machine
translator, as the term "pagefood" is meaningless to me. Are you referring
to the footer?

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA















- Vis tekst i anførselstegn -

Hi - ofcurse, not pagefood but pagefooter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top