H
Harpik
I'm looking for some kind of automated logging into Microsoft Outlook
Journal.
I wish that script was started from command line start timer and that
apps, than after minut later check what is oppened from main bar. And
on closing that apps stop the timer and save new item into Microsoft
Outlook Journal. I have found sth like that (at end), but it is not
compatibile to new version of autocad, neither it cannot work with all
apps, but only Autocad or others that have VBA. After few minutes
using autocad it hangs apps, dont know why. But logging and so on is
ok.
Thanks for any clue.
Harpik
--- code ##---
Option Explicit
Public WithEvents ACADApp As AcadApplication ' Use with Application
Event Examples
Public myolapp As Object
Public myitem As Object
Public SALARYMANOPEN As Boolean
Public DOCUMENTNAME As String
Public REGVAL As Variant
Public FN
Sub AcadStartup()
' This example intializes the public variable (ACADApp) which will
be used
' to intercept AcadApplication Events
'
' The VBA WithEvents statement makes it possible to intercept an
generic Object
' with the events associated with that object.
'
' Before you will be able to trigger any of the AcadApplication
events,
' you will first need to run this procedure.
' We could get the application from the ThisDocument object, but
that would
' require having a drawing open, so we grab it from the system.
Set ACADApp = GetObject(, "AutoCAD.Application")
FN = GetVariable("DWGNAME")
Call ACADApp_EndOpen(FN)
End Sub
Private Sub ACADApp_BeginQuit(Cancel As Boolean)
If DOCUMENTNAME = "" Then End
myitem.Subject = DOCUMENTNAME
myitem.StopTimer
myitem.Save
SALARYMANOPEN = False
End Sub
Private Sub ACADApp_EndOpen(ByVal FileName As String)
If SALARYMANOPEN = True Then
myitem.Subject = DOCUMENTNAME
myitem.StopTimer
myitem.Save
End If
Set myolapp = CreateObject("Outlook.Application")
Set myitem = myolapp.CreateItem(4)
myitem.Type = "AutoCAD"
myitem.StartTimer
SALARYMANOPEN = True
DOCUMENTNAME = FileName
End Sub
--- end code ### ----
Journal.
I wish that script was started from command line start timer and that
apps, than after minut later check what is oppened from main bar. And
on closing that apps stop the timer and save new item into Microsoft
Outlook Journal. I have found sth like that (at end), but it is not
compatibile to new version of autocad, neither it cannot work with all
apps, but only Autocad or others that have VBA. After few minutes
using autocad it hangs apps, dont know why. But logging and so on is
ok.
Thanks for any clue.
Harpik
--- code ##---
Option Explicit
Public WithEvents ACADApp As AcadApplication ' Use with Application
Event Examples
Public myolapp As Object
Public myitem As Object
Public SALARYMANOPEN As Boolean
Public DOCUMENTNAME As String
Public REGVAL As Variant
Public FN
Sub AcadStartup()
' This example intializes the public variable (ACADApp) which will
be used
' to intercept AcadApplication Events
'
' The VBA WithEvents statement makes it possible to intercept an
generic Object
' with the events associated with that object.
'
' Before you will be able to trigger any of the AcadApplication
events,
' you will first need to run this procedure.
' We could get the application from the ThisDocument object, but
that would
' require having a drawing open, so we grab it from the system.
Set ACADApp = GetObject(, "AutoCAD.Application")
FN = GetVariable("DWGNAME")
Call ACADApp_EndOpen(FN)
End Sub
Private Sub ACADApp_BeginQuit(Cancel As Boolean)
If DOCUMENTNAME = "" Then End
myitem.Subject = DOCUMENTNAME
myitem.StopTimer
myitem.Save
SALARYMANOPEN = False
End Sub
Private Sub ACADApp_EndOpen(ByVal FileName As String)
If SALARYMANOPEN = True Then
myitem.Subject = DOCUMENTNAME
myitem.StopTimer
myitem.Save
End If
Set myolapp = CreateObject("Outlook.Application")
Set myitem = myolapp.CreateItem(4)
myitem.Type = "AutoCAD"
myitem.StartTimer
SALARYMANOPEN = True
DOCUMENTNAME = FileName
End Sub
--- end code ### ----