Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
pmm pmm is offline
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
pmm pmm is offline
external usenet poster
 
Posts: 5
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Suzanne S. Barnhill Suzanne S. Barnhill is offline
external usenet poster
 
Posts: 33,624
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
footnotes from text in a textbox JG Microsoft Word Help 2 October 5th 07 03:55 PM
Losing textbox on table Jack Tables 13 November 21st 06 03:09 AM
Flickering when Header contains Textbox or Table Igor$ Microsoft Word Help 3 October 4th 06 11:58 AM
Captions don't show up in table of figures when in a textbox Sanne Heesmans Microsoft Word Help 3 July 13th 05 02:36 PM
How can I insert a textbox in a table cell in Word. PaulS Tables 1 June 26th 05 11:05 AM


All times are GMT +1. The time now is 11:45 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"