Home > database >  PB how to control the word text box shows
PB how to control the word text box shows

Time:09-27

I recently met a thorny problem, how to control in the word document by PB, according to the text frame's checked a lot of information on the net, will also be related to the VBA code in PB in execution, but no matter how to debug is not successful, please bosses teach: the VBA code below should be how to call in the PB, thank you,
ActiveDocument. Shapes (" Text Box 13 "). Select
Selection. The ShapeRange. Select
Selection. TypeText Text:="DDDDD"

CodePudding user response:

Didn't do it, for the top.

CodePudding user response:

Is usually combined with ole_1. Object. Call the following code

ActiveDocument. Shapes (" Text Box 13 "). Select
Selection. The ShapeRange. Select
Selection. TypeText Text:="DDDDD"

CodePudding user response:

Looking forward to, how to position the tags inside the text box?

CodePudding user response:

Can be inserted in the text box bookmarks, is implemented as follows, such as bookmark name
IF ole_Word. Object. Application. The ActiveDocument. Bookmarks. The Exists (" name ") THEN
Ole_Word. Object. Application. The activedocument. Bookmarks. Item (" name "). The select//locating bookmark name
Ole_Word. Object. Application. The selection. The typetext (ls_name)//insert value
For I=1 to 10
//to eliminate illegal characters
Ole_Word. Object. Application. Selection. TypeBackspace ()
Next
The ELSE//error message
END the IF

CodePudding user response:

How to control in the word document by PB, according to the text frame's

Want to how to control the text frame's display, can make clear some

ActiveDocument. Shapes (" Text Box 13 "). Select
Selection. The ShapeRange. Select
Selection. TypeText Text:="DDDDD"
This code if you just chose the text box, and then sets the file content to "DDDD"
  • Related