Re: Copying text from an editable text box to a table cell
- From: kimkom <kimkom@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 4 Nov 2008 00:48:01 -0800
Hi David,
Apologies if the info provided was inadequate.
In answer to your question, I am trying to duplicate text from a Text Box
(ActiveX Control) inserted via the Developer tab in slide 2 of a
presentation.
The text will be inputted during runtime of the PPS and duplicated to three
separate tables on slide 3 of the same presentation.
I just can't figure out the correct syntax. Any help will be gratefully
appreciated.
Many thanks,
Michael
"David Marcovitz" wrote:
You'll have to figure out some more information for us because we can.
not look over your shoulder. The question is: exactly where is it that
you want to get the text from. You call it an editable textbox so I am
assuming it is a text box created with the control toolbox. However, I
could imagine it is a standard text box that you have gotten text into
in some other way. I could also imagine that you have used the InputBox
command to pop up a text box to input text. All of these things, and the
details accompanying them, will be needed to figure out the exact line
of code you need. The good news is that this sounds like something
really easy (i.e., getting text from an object) so once you identify the
object, we should be able to figure it out. I just don't know what the
object is without you telling me more details.
--David
In article <99F774D5-96A9-46EE-AA46-0BC276088C57@xxxxxxxxxxxxx>,
kimkom <kimkom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Please, can somebody help out with this?
Thanks,
Michael
"kimkom" wrote:
Thanks for the reply David.
Unfortunately I'm still struggling to fing the correct syntax to get this
to
work. I have tried what you suggested (which seems logical to me) but still
no joy. Also tried all variants of the syntax I could think of.
This is the working code i currently have in place which is doing the job
fine:
Sub DuplicateTable()
Dim oSource_table As Table
Set oSource_table =
ActivePresentation.Slides(2).Shapes("SourceTable").Table
Dim oTarget_table As Table
Set oTarget_table = ActivePresentation.Slides(3).Shapes("PrintTable").Table
With oTarget_table
oTarget_table.Cell(1, 2).Shape.TextFrame.TextRange.Text = _
oSource_table.Cell(1, 2).Shape.TextFrame.TextRange.Text
End With
ActivePresentation.SlideShowWindow.View.GotoSlide 3
End Sub
This is applied to a button on slide 3 which when pressed, refreshes the
table on that slide with the information from a table on slide 2.
What I am trying to achieve now is to use editable text boxes in PPS mode
to
populate the same table.
Any help would be gratefully received.
Many thanks,
Michael
"David Marcovitz" wrote:
If the textbox is on Slide 1 and is named TextBox1, you can get the text
from it with:
Slide1.TextBox1.Text
If you have some other pointer (named myTextBox) to the text box, it
could be as simple as:
myTextBox.Text
This is for control (editable) text boxes. The syntax would be different
for regular autoshape text boxes.
--David
--
David Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
In article <E0A9F8E0-75A8-4218-AB63-00FA1F18D5F0@xxxxxxxxxxxxx>,
kimkom <kimkom@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
Thought it might be more useful if I posted the sub code. The chunk of
the
code goes like this:
Sub DuplicateTable()
Dim oSource_table As Table
Set oSource_table =
ActivePresentation.Slides(2).Shapes("SourceTable").Table
Dim oTarget_table As Table
Set oTarget_table =
ActivePresentation.Slides(3).Shapes("TargetTable").Table
With oTarget_table
oTarget_table.Cell(1, 2).Shape.TextFrame.TextRange.Text = _
oSource_table.Cell(1, 2).Shape.TextFrame.TextRange.Text
End With
End Sub
So just to repeat my question, how would this alter to use text from an
editable text box instead of a table cell?
Thanks,
Michael
"kimkom" wrote:
Hi,
Hope you are all well.
I currently have some code in place to copy text from a table cell to
another table cell on another slide - something like this...
oTarget_table.Cell(1,2).Shape.TextFrame.TextRange.Text = _
oSource_table.Cell(1,2).Shape.TextFrame.TextRange.Text
Now...
I'm planning on using an editable text box as the text source which
would
populate the destination table in the same way. Thus the user would
be able
to enter their text while in the PPS and the text in the target table
would
be updated.
How would my code change to make this happen?
Many thanks,
Michael
--
David Marcovitz
Microsoft PowerPoint MVP
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
- Follow-Ups:
- Re: Copying text from an editable text box to a table cell
- From: Steve Rindsberg
- Re: Copying text from an editable text box to a table cell
- References:
- Re: Copying text from an editable text box to a table cell
- From: kimkom
- Re: Copying text from an editable text box to a table cell
- From: David Marcovitz
- Re: Copying text from an editable text box to a table cell
- Prev by Date: Re: PPS not reading from email
- Next by Date: Re: How do I change the spacing between the slides on the handouts
- Previous by thread: Re: Copying text from an editable text box to a table cell
- Next by thread: Re: Copying text from an editable text box to a table cell
- Index(es):
Relevant Pages
|