Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Script Help

Status
Not open for further replies.

littlekatfish2003

Programmer
Oct 10, 2008
1
US
Hey guys I am taking a scripting class in college. I need some help on VBscript I wrote a script to allow a user to open a word file, and text is automatically inserted, but i need the text that is automatically inserted to appear at the bottom of the document unstead of the top. There has to be some way to move the text cusor position. Here's what I got so far:

Set dialog = CreateObject("userAccounts.CommonDialog")
result = dialog.showOpen

Set objWord = CreateObject("Word.Application")

objword.visible=true

Set objDoc = objWord.Documents.Open(dialog.filename)

Set objSelection = objWord.Selection

objSelection.Font.Size = "16"

objSelection.Font.name = "Times New Roman"

objSelection.TypeText "Shadow Was here"

objSelection.TypeParagraph()

Thanks,
littlekatfish2003
 
objSelection.EndKey 6 'wdStory

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top