Printing from access to word using vb

  • Thread starter Thread starter Faisal
  • Start date Start date
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?
 
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
 
Back
Top