Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Deleting the content of a text field

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
info@forsthaus-auerhahn.de - 27 Sep 2006 09:10 GMT
Hi,

ist there any possibilty to delete the content of a text field with
vba?

Best regards
Tobias Zepf
Jezebel - 27 Sep 2006 09:48 GMT
ActiveDocument.FormFields("Text1").TextInput.Clear

> Hi,
>
[quoted text clipped - 3 lines]
> Best regards
> Tobias Zepf
info@forsthaus-auerhahn.de - 27 Sep 2006 11:55 GMT
Hi,

hmm i test your code, but doesn´t work correct. is there a difference
between a text field and a text box. word says that the name of my box
is "Text Box 10". How can i delete the content of this box?

thanks for answers

Jezebel schrieb:

> ActiveDocument.FormFields("Text1").TextInput.Clear
>
[quoted text clipped - 5 lines]
> > Best regards
> > Tobias Zepf
Jean-Guy Marcil - 27 Sep 2006 12:09 GMT
info@forsthaus-auerhahn.de was telling us:
info@forsthaus-auerhahn.de nous racontait que :

> Hi,
>
> hmm i test your code, but doesn´t work correct. is there a difference
> between a text field and a text box. word says that the name of my box
> is "Text Box 10". How can i delete the content of this box?

You originally asked about a text field (Inserted in a document with the
Forms Toolbar), but are now writing about text boxes (Inserted with the
Controls Toolbar, or on a userform).
Which is it? The code is not the same and will not be stored in the same
place...

Signature

Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
jmarcilREMOVE@CAPSsympatico.caTHISTOO
Word MVP site: http://www.word.mvps.org

info@forsthaus-auerhahn.de - 27 Sep 2006 12:22 GMT
I wantr to delete the content of a text box inserted by controls
toolbar. i was troubled with the difference of text field and text box.
sorry about that. text box is in german a "Textfeld". it sounds similar
than text field ;-)

Jean-Guy Marcil schrieb:

> info@forsthaus-auerhahn.de was telling us:
> info@forsthaus-auerhahn.de nous racontait que :
[quoted text clipped - 17 lines]
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site: http://www.word.mvps.org
Helmut Weber - 27 Sep 2006 12:30 GMT
Hi Jean-Guy Marcil,

a lesson in german free of charge

:-)

forsthaus = forester's lodge
auerhahn  = wood grouse

Have a nice day

Helmut
Helmut Weber - 27 Sep 2006 12:23 GMT
Hallo  Tobias,

try:
  ActiveDocument.Shapes("Text Box 10").TextFrame.TextRange = ""
or:
  ActiveDocument.Shapes("Text Box 10").TextFrame.TextRange.delete

There are very subtle differences between both methods.
Da gibt es ganz feine Unterschiede zwischen den beiden Methoden..

>is there a difference between a text field and a text box.

A textformfield is something quite different.
Ein Textformfeld ist etwas ganz anderes.

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

info@forsthaus-auerhahn.de - 27 Sep 2006 12:43 GMT
hallo helmut,

jetzt klappts prima :-)

vielen vielen dank

Helmut Weber schrieb:

> Hallo  Tobias,
>
[quoted text clipped - 18 lines]
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.