Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write text in table within textbox placed in pagefood
Hi
I have a problem with a table/texbox object placed in pagefood. Se the description and code he '------------------------------------------------------------------------- ' 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.Spa ceAfter = 10 'Line 2: Font size 16 txt_adress.Paragraphs(2).Range.Font.Size = 16 End With End Sub |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write text in table within textbox placed in pagefood
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 "pmm" wrote in message ... Hi I have a problem with a table/texbox object placed in pagefood. Se the description and code he '------------------------------------------------------------------------- ' 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.Spa ceAfter = 10 'Line 2: Font size 16 txt_adress.Paragraphs(2).Range.Font.Size = 16 End With End Sub |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write text in table within textbox placed in pagefood
On 17 Feb., 05:32, "Suzanne S. Barnhill" wrote:
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 "pmm" wrote in message ... Hi I have a problem with a table/texbox object placed in pagefood. Se the description and code he '------------------------------------------------------------------------- ' 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.Spa ceAfter = 10 * 'Line 2: Font size 16 * txt_adress.Paragraphs(2).Range.Font.Size = 16 * End With End Sub- Skjul tekst i anførselstegn - - Vis tekst i anførselstegn - Hi - ofcurse, not pagefood but pagefooter |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Write text in table within textbox placed in pagefood
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 "pmm" wrote in message ... On 17 Feb., 05:32, "Suzanne S. Barnhill" wrote: 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 "pmm" wrote in message ... Hi I have a problem with a table/texbox object placed in pagefood. Se the description and code he '------------------------------------------------------------------------- ' 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.Spa ceAfter = 10 'Line 2: Font size 16 txt_adress.Paragraphs(2).Range.Font.Size = 16 End With End Sub- Skjul tekst i anførselstegn - - Vis tekst i anførselstegn - Hi - ofcurse, not pagefood but pagefooter |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
footnotes from text in a textbox | Microsoft Word Help | |||
Losing textbox on table | Tables | |||
Flickering when Header contains Textbox or Table | Microsoft Word Help | |||
Captions don't show up in table of figures when in a textbox | Microsoft Word Help | |||
How can I insert a textbox in a table cell in Word. | Tables |