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 / October 2005

Tip: Looking for answers? Try searching our database.

Word bug editing field text in text-wrapped table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Peacock - 24 Oct 2005 15:01 GMT
The code below should create a new document field and remove its code
text. However, in Word 2000 and XP, if the range of the new field
happens to occur inside a table which has its "Text Wrapping" property
set to "Around", the text "T " is always left behind in the field. In
fact, any assignment to the field code's "Text" property appends "T "
to the end of the text assigned.

Has anyone seen this apparent bug before? Does anyone have a solid
workaround? The only workaround I've found is to call "Delete" on the
field's code before assigning a value to its "Text" property.

Thanks.
Anne Troy - 24 Oct 2005 15:05 GMT
Chris: You forgot to post your code. :)
************
Anne Troy
www.OfficeArticles.com

> The code below should create a new document field and remove its code
> text. However, in Word 2000 and XP, if the range of the new field
[quoted text clipped - 8 lines]
>
> Thanks.
Chris Peacock - 24 Oct 2005 16:02 GMT
Oops!!! Thanks. Here goes....

Sub Test()
   Dim field As field
   Dim rangeField As range
   Dim table As table

   Set table = Tables(1)
   Set rangeField = range(0, 0)
   Set field = Fields.Add(rangeField)
   field.Code.Text = ""
End Sub
 
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.