![]() This is code you could use, I was able to just figure out the answer. If shp.AutoShapeType = msoShapeRectangle Then ![]() Tip: I turned on paragraph markers to see the textboxes more clearly.Įxample of Code I've written so far: Sub TextBox()ĭim doc As word.Document, rng As word.Rangeĭim shp As Shape, iShp As word.InlineShape The text in the field is all random so I can't do a specific find word and replace so that's why I'm trying to do it by id or even just by having it do a count of the number of shapes on the page of a word document. Though Process: Because all the files have the same format, if I can figure out the id of that shape or textbox, I can directly reference that id and change the textfield that way. So for example I have a 5 Textboxes next to each other and say I want to edit the 4th textbox to say something since it's blank without affecting the other textboxes. In my case, textfields are shown as a part of shapes and the textfields themselves don't have name's to them so I wanted to possibly do it by their shape ID. I'm trying to create a way for a word document to have certain textfields data to be replaced with other data.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |