Steps:
Create object using word application
Make the object visible
Open a new word file with help of
add method
Assign the word selection to
variable
Write the text by using
Ans:
set word = createobject("word.application")
word.visible=true
set doc = word.documents.add
Set objectSelection = Word.Selection
objectSelection.TypeText "This is sample text"
doc.saveas("c:\test.docx")
SUBSCRIBE YOUTUBE CHANNEL FOR LATEST VIDEOS
https://www.youtube.com/channel/UC1EmncBu2maDiHNMNNqxw9g
SUBSCRIBE YOUTUBE CHANNEL FOR LATEST VIDEOS
https://www.youtube.com/channel/UC1EmncBu2maDiHNMNNqxw9g
No comments:
Post a Comment