I guess it must have been confusing considering the Topic.
I am trying to create a table in Word and then grouping a number of the
records from an access table and then trying to send them to the word
document. It is very simple to do, until I try to create the word tables. As
I said, it works once and then the second time it crashes with the message I
showed.
"objWord.ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1,
NumColumns:=3, DefaultTableBehavior:=wdWord9TableBehavior"
It then works the third time but not the fourth, works the fifth but not the
sixth etc. etc.
What I don't understand is why.
You said
> Tables are a fundamental design foundation of a database and one doesn't
> 'start adding tables' when running the application... do you mean adding
> records?
Actually, using a maketable query, tables can be created and added at run
time.
"NTC" wrote:
> this is a very confusing question;
>
> you state that you 'start adding tables'...
>
> Tables are a fundamental design foundation of a database and one doesn't
> 'start adding tables' when running the application... do you mean adding
> records?
>
> Also it almost seems like you are saying that you are attempting to add data
> to a database via a Word doc, which of course is not possible....
>
> You will need to restate your question...
>
> "Peter" wrote:
>
> > Hi, I have a problem that is causing me extreme frustration so I hope someone
> > can help me.
> >
> > I have created a maintenance database program that selects a number of
> > maintenance tasks, groups them and then creates a word document with them.
> >
> > It works great.... until I start adding tables to put the maintenance tasks
> > in.
> >
> > It creates the tables no problem.... the first time.
> >
> > The next time it crashes with the following error code:"The remote Server or
> > Machine does not exist or is unavailble".
> >
> > I then close word down, go back to Access program and try again and it
> > works????. It seems that it works the first time and then every second time
> > after that. I am totally baffled.
> >
> > It always crashes at the same spot and that is at the following code:
> >
> > "objWord.ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1,
> > NumColumns:=3, DefaultTableBehavior:=wdWord9TableBehavior"
> >
> > I have no idea why.
> >
> > I hope there is somone who can help.
> >
> > Thank you
|