G
Gina
Hi.
I posted before and got some ideas but I am still struggeling.
The final testing of my tool is a disaster (promised to hand it over on
Monday!)
Couldn't find any code around either.
What I try to do is to create an object
Set WD = CreateObject("Word.Document") ' WD is a public
variable in the module TransferToWord
reVorlage = CurrentProject.Path & "\Rechnung1.dot"
Set DC = Word.Documents.Add(reVorlage, , , True)
I use several different subs and functions to write different parts to word
at the end of each function I: Set DC = Nothing
at the beginning of each function I do Set DC =
GetObject(Word.ActiveDocument)
all works fine more or less... but now I had to find out that it isn't
working correctly
at the end of the transfer of records I cal a function to release word:
Set DC = GetObject(Word.ActiveDocument)
Set DC = Nothing : Set WD = Nothing
When I close the word application I cannot restart it without that message:
Remote-Server-Computer not existant or not available
I presume the template Rechnung1.dot or word itself must is still open.
when I don't initialise WD I get an activeX-Error mess.
Maybe a helpful person has probably a piece of code on how to create and
release that word document collection object
- or whatever it is, please ???? please!!!
Gina
I posted before and got some ideas but I am still struggeling.
The final testing of my tool is a disaster (promised to hand it over on
Monday!)
Couldn't find any code around either.
What I try to do is to create an object
Set WD = CreateObject("Word.Document") ' WD is a public
variable in the module TransferToWord
reVorlage = CurrentProject.Path & "\Rechnung1.dot"
Set DC = Word.Documents.Add(reVorlage, , , True)
I use several different subs and functions to write different parts to word
at the end of each function I: Set DC = Nothing
at the beginning of each function I do Set DC =
GetObject(Word.ActiveDocument)
all works fine more or less... but now I had to find out that it isn't
working correctly
at the end of the transfer of records I cal a function to release word:
Set DC = GetObject(Word.ActiveDocument)
Set DC = Nothing : Set WD = Nothing
When I close the word application I cannot restart it without that message:
Remote-Server-Computer not existant or not available
I presume the template Rechnung1.dot or word itself must is still open.
when I don't initialise WD I get an activeX-Error mess.
Maybe a helpful person has probably a piece of code on how to create and
release that word document collection object
- or whatever it is, please ???? please!!!
Gina