Printing from access to word using vb

F

Faisal

I am trying to print data from an access form to a word
template, here is my code:
Dim ObjWord As Object
Dim StrDate, StrAmount, StrPayee, StrMemo, StrAmountText,
StrRemainAmount, StrFullAmount, StrRemainAmountText,
StrFullAmountText As String

On Error GoTo ErrorHandler_1
Set ObjWord = CreateObject("Word.Application")
ObjWord.Visible = True


ObjWord.Documents.Add
Template:="C:\Faisal\cheque_template.dot"

ObjWord.ActiveDocument.PrintOut

'Do While ObjWord.BacgroundPrintingStatus > 0
'Loop
ObjWord.Quit wdDoNotSaveChanges
Set ObjWord = Nothing
please help, I am also hooked up on a network printer
right now, is that creating a conflict?
please advise?
 
E

Eric

Hi,

It would help to know what the problem is.

To answer your question about the network printer. No it
wouldn't make a difference if it was local or networked.

Regards,
Eric
 

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