J
Joe Cartoon
Hi Jonathan,
I just installed WINXP+VB6 SP6 + OFFICE 2000.
Word does not print
As I wrote before -
1. The document is created and exists on the HD.
2. I see the printer icon
Here is the code:
Thanks in advance.
Guy
''''''''''''''
On Error GoTo EH
Dim B As Boolean
Dim S As String
'wdAlignParagraphLeft = 0
'wdAlignParagraphCenter = 1
'wdAlignParagraphRight = 2
'wdUnderlineNone = 0
'wdUnderlineSingle = 1
Dim WordApp As Word.Application
Dim WordDoc As Word.Document
Dim wRange As Word.Range
Dim wField As Word.Field
Dim wParagraph As Word.Paragraph
B = True
DoEvents
If Not (WordDoc Is Nothing) Then
WordDoc.Close
Set WordDoc = Nothing
End If
If Not (WordApp Is Nothing) Then
WordApp.Quit
Set WordApp = Nothing
End If
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = True
Set WordDoc = WordApp.Documents.Add
S = "bla bla bla"
Set wParagraph = WordDoc.Content.Paragraphs.Add()
With wParagraph
.Range.Text = S
.Format.SpaceAfter = 5
.Range.InsertParagraphAfter
End With
Call WordDoc.SaveAs("C:\123.doc")
Call WordDoc.PrintOut(True)
DoEvents
If Not (WordDoc Is Nothing) Then
Call WordDoc.Close(False)
End If
If Not (WordApp Is Nothing) Then
Call WordApp.Quit(False)
End If
EOF:
If Not (WordDoc Is Nothing) Then
Set WordDoc = Nothing
End If
If Not (WordApp Is Nothing) Then
Set WordApp = Nothing
End If
bmfPrintMakeCardReportDOC = B
Exit Function
EH:
B = False
Call gsReportSystemError("Sub name", Err.Number, Err.Description)
Resume EOF
''''''''''''''
I just installed WINXP+VB6 SP6 + OFFICE 2000.
Word does not print
As I wrote before -
1. The document is created and exists on the HD.
2. I see the printer icon
Here is the code:
Thanks in advance.
Guy
''''''''''''''
On Error GoTo EH
Dim B As Boolean
Dim S As String
'wdAlignParagraphLeft = 0
'wdAlignParagraphCenter = 1
'wdAlignParagraphRight = 2
'wdUnderlineNone = 0
'wdUnderlineSingle = 1
Dim WordApp As Word.Application
Dim WordDoc As Word.Document
Dim wRange As Word.Range
Dim wField As Word.Field
Dim wParagraph As Word.Paragraph
B = True
DoEvents
If Not (WordDoc Is Nothing) Then
WordDoc.Close
Set WordDoc = Nothing
End If
If Not (WordApp Is Nothing) Then
WordApp.Quit
Set WordApp = Nothing
End If
Set WordApp = CreateObject("Word.Application")
WordApp.Visible = True
Set WordDoc = WordApp.Documents.Add
S = "bla bla bla"
Set wParagraph = WordDoc.Content.Paragraphs.Add()
With wParagraph
.Range.Text = S
.Format.SpaceAfter = 5
.Range.InsertParagraphAfter
End With
Call WordDoc.SaveAs("C:\123.doc")
Call WordDoc.PrintOut(True)
DoEvents
If Not (WordDoc Is Nothing) Then
Call WordDoc.Close(False)
End If
If Not (WordApp Is Nothing) Then
Call WordApp.Quit(False)
End If
EOF:
If Not (WordDoc Is Nothing) Then
Set WordDoc = Nothing
End If
If Not (WordApp Is Nothing) Then
Set WordApp = Nothing
End If
bmfPrintMakeCardReportDOC = B
Exit Function
EH:
B = False
Call gsReportSystemError("Sub name", Err.Number, Err.Description)
Resume EOF
''''''''''''''