S
sal21
... from another application a save the print job (in txt format) and my
problem is ...
Know when the job of print is finished
i import the finished file from (part of code):
sub import_file()
Dim RIGA As String
Dim var_DATACONT As Date
Dim var_VAL As Date
Dim Vfile
iFile = FreeFile()
Vfile = ("C:\EPF\L0785.EPF")
Open Vfile For Input As #1
While Not EOF(1)
Line Input #1, RIGA
If Len(Trim(RIGA)) > 0 Then
If InStr(Mid(RIGA, 1, 12), "DATA CONTAB.") > 0 Then
var_DATACONT = Mid(RIGA, 15, 10)
End If
If InStr(Mid(RIGA, 1, 11), "DIPENDENZA:") > 0 Then
var_DIP = Format(Mid(RIGA, 14, 4), "#00000")
End If
If InStr(Mid(RIGA, 5, 1), "-") > 0 And InStr(Mid(RIGA, 13, 1), "-") > 0
Then
var_COD = Mid(RIGA, 1, 3)
End If
.............
If i take this file from the VBA import command before the rpint job is
finished i recieve this msg " ATTENTION THE FILE IS OCCUPED from
another application...) ecc...
problem is ...
Know when the job of print is finished
i import the finished file from (part of code):
sub import_file()
Dim RIGA As String
Dim var_DATACONT As Date
Dim var_VAL As Date
Dim Vfile
iFile = FreeFile()
Vfile = ("C:\EPF\L0785.EPF")
Open Vfile For Input As #1
While Not EOF(1)
Line Input #1, RIGA
If Len(Trim(RIGA)) > 0 Then
If InStr(Mid(RIGA, 1, 12), "DATA CONTAB.") > 0 Then
var_DATACONT = Mid(RIGA, 15, 10)
End If
If InStr(Mid(RIGA, 1, 11), "DIPENDENZA:") > 0 Then
var_DIP = Format(Mid(RIGA, 14, 4), "#00000")
End If
If InStr(Mid(RIGA, 5, 1), "-") > 0 And InStr(Mid(RIGA, 13, 1), "-") > 0
Then
var_COD = Mid(RIGA, 1, 3)
End If
.............
If i take this file from the VBA import command before the rpint job is
finished i recieve this msg " ATTENTION THE FILE IS OCCUPED from
another application...) ecc...