Here is my recording macros, don't know how to write code
Sub macro (4)
'
"Acer 4
'
'
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
Selection. TypeBackspace
Selection. TypeBackspace
Selection. TypeBackspace
Selection. TypeBackspace
Selection. TypeText Text:="the first Text box"
ActiveDocument. Shapes. Range (Array (" text box 2 ")). Select
Selection. TypeBackspace
Selection. TypeBackspace
Selection. TypeBackspace
Selection. TypeText Text:="the second Text box"
End Sub
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
OWrd=CREATEOBJECT (" Word. Application ")
Owrd. Documents. The Open (GETFILE (" DOCX ")) & amp; & Open the existing document
Owrd. Visible=. T.
Owrd. ActiveDocument. Shapes (2). The Range, the text="KKK" & amp; & The trip operation error, according to?
* owrd. ActiveDocument. Shapes. Range (Array (" text box 2 "). The Range. The text="KKK"
CodePudding user response:
Done, junction postOWrd=CREATEOBJECT (" Word. Application ")
Owrd. Documents. The Open (GETFILE (" DOCX ")) & amp; & Open the existing document
Owrd. Visible=. T.
* with owrd
Owrd. ActiveDocument. Shapes. The Range (1). Select
Owrd. Selection. Range. The text="the first text box"
Owrd. ActiveDocument. Shapes. Range. (2) Select
Owrd. Selection. Range. The text="the second text box"
* ENDWITH