Edit shape text (with inserted field) programatically

J

John

Apologies for re-posting this, but I don't think I've quite got the answer
yet. The question is how do I edit the text in a shape (programatically)
whilst retaining an inserted field that already exists within the text?

Thanks in advance

John

John said:
Hi June,

Yes, that's why I've posted this to the vba group. Perhaps I wasn't
clear.
Should I write something like:

shp.Text = "This is the first" & PageNameInsertedField & " drawing"

My assumption though, is that as the text is overwritten, the inserted
field
would be lost and therefore it wouldn't be available to reference in the
shp.Text....statement.

Is that right?

John


JuneTheSecond said:
VBA may be a good help.


John said:
Hi there,

I have a number of files all of which have a similar title textbox (part
of
a group page border) on a number of background pages. The text itself
contains an inserted field which displays the current foreground page name
(eg: "This Is The First [PageName] Drawing").

The problem is how do I go about changing the text but retain the inserted
field?

Main objective - is to have a form with a textbox the contents of which
will
be applied to the background pages.

Note that the inserted filed already exists in the shape.

Best regards

John
 
J

JuneTheSecond

objShape.Character.Text property may be useful for your project.

John said:
Apologies for re-posting this, but I don't think I've quite got the answer
yet. The question is how do I edit the text in a shape (programatically)
whilst retaining an inserted field that already exists within the text?

Thanks in advance

John

John said:
Hi June,

Yes, that's why I've posted this to the vba group. Perhaps I wasn't
clear.
Should I write something like:

shp.Text = "This is the first" & PageNameInsertedField & " drawing"

My assumption though, is that as the text is overwritten, the inserted
field
would be lost and therefore it wouldn't be available to reference in the
shp.Text....statement.

Is that right?

John


JuneTheSecond said:
VBA may be a good help.


John said:
Hi there,

I have a number of files all of which have a similar title textbox (part
of
a group page border) on a number of background pages. The text itself
contains an inserted field which displays the current foreground page name
(eg: "This Is The First [PageName] Drawing").

The problem is how do I go about changing the text but retain the inserted
field?

Main objective - is to have a form with a textbox the contents of which
will
be applied to the background pages.

Note that the inserted filed already exists in the shape.

Best regards

John
 
J

John

Perfect. Thanks June.


JuneTheSecond said:
objShape.Character.Text property may be useful for your project.

John said:
Apologies for re-posting this, but I don't think I've quite got the
answer
yet. The question is how do I edit the text in a shape (programatically)
whilst retaining an inserted field that already exists within the text?

Thanks in advance

John

John said:
Hi June,

Yes, that's why I've posted this to the vba group. Perhaps I wasn't
clear.
Should I write something like:

shp.Text = "This is the first" & PageNameInsertedField & " drawing"

My assumption though, is that as the text is overwritten, the inserted
field
would be lost and therefore it wouldn't be available to reference in
the
shp.Text....statement.

Is that right?

John


message
VBA may be a good help.


John said:
Hi there,

I have a number of files all of which have a similar title textbox
(part
of
a group page border) on a number of background pages. The text itself
contains an inserted field which displays the current foreground page
name
(eg: "This Is The First [PageName] Drawing").

The problem is how do I go about changing the text but retain the
inserted
field?

Main objective - is to have a form with a textbox the contents of which
will
be applied to the background pages.

Note that the inserted filed already exists in the shape.

Best regards

John
 

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