word to open in vb and then let the user to use word and then back to word

D

donald

hi there,

i trying to get winword to open and then get the user to change it and
then when they close it i need to get some code to run.

here is my code

wordApp = New Word.Application

wordDoc = wordApp.Documents.Open("C:\Program
Files\Dorling Consultancy\DMCRM\word doc\General Letter to Client.doc")

With wordSelection
.MoveDown(Word.WdUnits.wdLine, 2)
.TypeText(Text:=itemofcleint.FullName)
.TypeParagraph()
.TypeText(Text:=itemofcleint.MailingAddress)
.MoveDown(Unit:=Word.WdUnits.wdLine, Count:=3)
.TypeText(Text:=Format(Now(), "dd MMMM yyyy"))
.TypeParagraph()
.MoveDown(Unit:=Word.WdUnits.wdLine, Count:=2)
.EndKey(Unit:=Word.WdUnits.wdLine)

..TypeText(Text:=itemofcleint.UserProperties.Find("Salutation").Value)
.EndKey(Unit:=Word.WdUnits.wdStory)
.TypeText(Text:=itemofcleint.ManagerName)
.HomeKey(Unit:=Word.WdUnits.wdStory)
End With

wordDoc.SaveAs(letter)

i need it to hand over to the user now

With wordApp.Application
.Visible = False
End With

do some more with the code and send a e-mail

which all works fine apart from the part where it need to hand over to
the user to type the letter

i know that there is a beforeClose but i need a afterClose

any help please

thanks a lot

donald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top