PC Review


Reply
Thread Tools Rate Thread

Access 2003 - Creating a Word Doc

 
 
Peter
Guest
Posts: n/a
 
      27th Oct 2008
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
 
Reply With Quote
 
 
 
 
NTC
Guest
Posts: n/a
 
      27th Oct 2008
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

 
Reply With Quote
 
Peter
Guest
Posts: n/a
 
      28th Oct 2008
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

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Word 2003 - Creating “sections” that are not locked in a Word form The Chomp Microsoft Word Document Management 3 12th Mar 2009 11:43 AM
Creating Word document of Word 97-2003 file type on the New menu in Vista =?Utf-8?B?TWlrcm9YUA==?= Windows Vista General Discussion 7 19th Mar 2007 04:59 PM
Creating Word document of Word 97-2003 file type on the New menu in Vista =?Utf-8?B?TWlrcm9YUA==?= Microsoft Word New Users 7 19th Mar 2007 04:59 PM
Executing Word 2003 Mailmerge from Access 2000 module running in Access 2003 ML Microsoft Access VBA Modules 3 25th Oct 2006 11:25 PM
Creating batch form emails from Access 2003 with Outlook 2003 =?Utf-8?B?QnJvc3N5Zw==?= Microsoft Access 0 24th Feb 2005 02:03 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:37 PM.