this is how i start the word application
Dim fileName As String
Dim wordapp As Word.Application
Dim document As Word.Document
fileName = Application.StartupPath & "\wordDocuments\templates\template.dot"
wordapp = New Word.Application
wordapp.Visible = True
wordapp.Activate()
document = wordapp.Documents.Open(fileName)
the strange thing is that the same code is also used in another form
(suppose there is as frmData2 which does the same thing (aka : opening a word
doc or opening an frmConnect form) but in the later case the code in the
activated event (of frmData2 form) is executed
do u think i should use system.diagnostics.process.start("....") ? how can i
get the process handle so that i use the waitForExit ?
i have tried
system.diagnostics.process.start("....")
a = system.diagnostics.process.getcurrentprocess
but this returns the process of my vb project
thx for your time
"Cor Ligthert" wrote:
> Juststarter,
>
> When the fromComment is showed
> dim frmComment as new formComment
> frmComment.showdialog
> 'Here is where should the operation go on when frmComment closes.
>
> However there is in my opinion no reason for an activated event, it is
> already active.
>
> For your word application it is very dependend how you start it.
> When it is with process.start you can set a
>
> http://msdn.microsoft.com/library/de...rexittopic.asp
>
> To get the same behaviour
>
> I hope this helps?
>
> Cor
>
>
> "juststarter" <(E-Mail Removed)>
> ...
> > frmSearch and frmData are mdi children ( frmSearch.mdiparent = frmMain,
> > frmData.mdiparent = frmMain) and are loaded using the show() method.
> > frmComments is non mdi and is shown using showDialog().
> >
> >
> >
> > "Cor Ligthert" wrote:
> >
> >> Juststarter
> >>
> >> Are it
> >> MDI forms
> >> or
> >> Showdialog forms
> >> or
> >> Forms all showed separatly and all in the same time active on the screen
> >> ?
> >>
> >> Cor
> >>
> >> "juststarter"
> >>
> >> > hi there
> >> > here is my problem :
> >> > there is a main form (frmMain) which calls a searchForm (frmSearch).
> >> > Then
> >> > i
> >> > select an item (from the returned ones) and open a third form
> >> > (frmData).
> >> > Taking from there i can either :
> >> > A. open a fourth form (frmComment) which is just a textbox and a button
> >> > (and
> >> > should return the text entered in the textbox into frmData)
> >> > B. open a word document ,and paste its contents into a richtextbox in
> >> > frmData
> >> > The problem is that whichever i do, the frmData 's activated Event
> >> > isn't
> >> > fired when i clos frmComment or the word Application.
> >> > shouldn't it be the case ?
> >>
> >>
> >>
>
>
>