Managing Word from Access

A

Alan

Hello,

I am trying to create a word document from within access
and I am having trouble moving text from a control on a
form into the word document. I can open Word and add a
document using a template file but when I go to push text
into the document I get an 'RPC server is unavailable'
error.

The second line here is what generates the error:

WordObj.Documents(stemp).Select
Selection.TypeParagraph

where WordObj is a valid reference to an active word app
object and stemp is the newly added document

I am using MSACCESS 98 and OFFICE 10 on an XP machine.

Any help would be highly appreciated.

Regards,

ALAN
 
T

Tim Ferguson

I can open Word and add a
document using a template file but when I go to push text
into the document I get an 'RPC server is unavailable'
error.

The second line here is what generates the error:

WordObj.Documents(stemp).Select
Selection.TypeParagraph

You would be better off asking this sort of thing in the Word VBA group.

The answer is, however, that you can't use the Selection object unless the
document is visible and activated. In any case, you don't need to use the
Selection, as a Range object would be quicker and easier to manipulate.

Hope that helps


Tim F
 

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