I was using HPGL earlier...I have HP LaserJet printer (MOdel: M176n). Current Driver is based on PCL6...
Have tried these VBA scripts without Luck.
Sub plt_PCL()
FNo = FreeFile
fName = "C:\Users\MMM\TestPCL.prn"
Open fName For Binary Lock Read Write As #FNo
Put #FNo, , Chr$(27) & "%-12345X@PJL" & vbCrLf
Put #FNo, , "@PJL COMMENT ** Begin JOB**" & vbCrLf
Put #FNo, , "@PJL ENTER LANGUAGE = PCL" & vbCrLf
Put #FNo, , Chr$(27) & "E" & Chr$(27) & "%0B"
Put #FNo, , "IN;DF;"
Put #FNo, , "SP1;PA10,10;PD2500,10,10,1500,10,10;"
Put #FNo, , "DT*;SS;LBThis is first text a:*"
Put #FNo, , Chr(27) & "%0A"
Put #FNo, , Chr(27) & "E"
Put #FNo, , Chr$(27) & "%-12345X@PJL" & vbCrLf
Close #FNo
End Sub
Even Tried Text File Like....
Sub plt()
Set TxtF = fsO.CreateTextFile("C:\Users\115264\Documents\HPGL_Reference\Test.prn", True, False)
TxtF.Write Chr$(27) & "E"
TxtF.Write Chr$(27) & "%0B"
TxtF.Write "IN;DF;"
TxtF.Write "SP1;PA10,10;PD2500,10,10,1500,10,10;"
TxtF.Write "DT#,1;LBThis is first text"
TxtF.Write Chr(27) & "%0A"
TxtF.Write Chr(27) & "E"
TxtF.Close
fsO.CopyFile "C:\Users\115264\Documents\HPGL_Reference\Test.prn", "\\RNWIT-42-2\hpgl2"
Set fsO = Nothing
End Sub
Request Guidance....Files to be TEXT file or BINARY??
Have tried these VBA scripts without Luck.
Sub plt_PCL()
FNo = FreeFile
fName = "C:\Users\MMM\TestPCL.prn"
Open fName For Binary Lock Read Write As #FNo
Put #FNo, , Chr$(27) & "%-12345X@PJL" & vbCrLf
Put #FNo, , "@PJL COMMENT ** Begin JOB**" & vbCrLf
Put #FNo, , "@PJL ENTER LANGUAGE = PCL" & vbCrLf
Put #FNo, , Chr$(27) & "E" & Chr$(27) & "%0B"
Put #FNo, , "IN;DF;"
Put #FNo, , "SP1;PA10,10;PD2500,10,10,1500,10,10;"
Put #FNo, , "DT*;SS;LBThis is first text a:*"
Put #FNo, , Chr(27) & "%0A"
Put #FNo, , Chr(27) & "E"
Put #FNo, , Chr$(27) & "%-12345X@PJL" & vbCrLf
Close #FNo
End Sub
Even Tried Text File Like....
Sub plt()
Set TxtF = fsO.CreateTextFile("C:\Users\115264\Documents\HPGL_Reference\Test.prn", True, False)
TxtF.Write Chr$(27) & "E"
TxtF.Write Chr$(27) & "%0B"
TxtF.Write "IN;DF;"
TxtF.Write "SP1;PA10,10;PD2500,10,10,1500,10,10;"
TxtF.Write "DT#,1;LBThis is first text"
TxtF.Write Chr(27) & "%0A"
TxtF.Write Chr(27) & "E"
TxtF.Close
fsO.CopyFile "C:\Users\115264\Documents\HPGL_Reference\Test.prn", "\\RNWIT-42-2\hpgl2"
Set fsO = Nothing
End Sub
Request Guidance....Files to be TEXT file or BINARY??