journal in outlook

journal in outlook

Anonymous
Not applicable
649 Views
10 Replies
Message 1 of 11

journal in outlook

Anonymous
Not applicable
so i am wondering can anyone look at this code and see if they can get it to
work? this is not my code this is from the www.autojournal.net web site. i
do not know anything about vba so please, i beg, do not give me explanations
on why is does not work since i will not able to do anything with it info
you provide.. thank you so much...
___________________________________________________
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


--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
0 Likes
650 Views
10 Replies
Replies (10)
Message 2 of 11

Anonymous
Not applicable
Jon,

What is the program doing? Does it give you an error
message? If so, what does the error message say?

Joe

Jon Baker wrote in message
news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> so i am wondering can anyone look at this code and see if they can get it
to
> work? this is not my code this is from the www.autojournal.net web site. i
> do not know anything about vba so please, i beg, do not give me
explanations
> on why is does not work since i will not able to do anything with it info
> you provide.. thank you so much...
> ___________________________________________________
> 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
>
>
> --
> A2Ki, SurvCad CES, Win98 se
> Remove NO SPAM from my email address to email
>
> Jonathan J. Baker
> R&R Engineers-Surveyors, Inc.
> Denver, Colorado
> _________________________
>
>
0 Likes
Message 3 of 11

Anonymous
Not applicable
well i am not getting any real errors...
i get this when first start acad:
Regenerating model.
Initializing VBA System...
Loading VBA startup file...

so i work for a while... save and close...
nothing is in the outlook journal. i went in the journal settings and
checked on AutoCAD drawing.

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Joe Sutphin" wrote in message
news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> Jon,
>
> What is the program doing? Does it give you an error
> message? If so, what does the error message say?
>
> Joe
>
> Jon Baker wrote in message
> news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > so i am wondering can anyone look at this code and see if they can get
it
> to
> > work? this is not my code this is from the www.autojournal.net web site.
i
> > do not know anything about vba so please, i beg, do not give me
> explanations
> > on why is does not work since i will not able to do anything with it
info
> > you provide.. thank you so much...
> > ___________________________________________________
> > 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
> >
> >
> > --
> > A2Ki, SurvCad CES, Win98 se
> > Remove NO SPAM from my email address to email
> >
> > Jonathan J. Baker
> > R&R Engineers-Surveyors, Inc.
> > Denver, Colorado
> > _________________________
> >
> >
>
>
0 Likes
Message 4 of 11

Anonymous
Not applicable
Jon,

I suspect that what you are not doing is running the AcadStartup macro.

Do the following after you load the program.

Type -vbarun at the AutoCAD command prompt
Type acadstartup

For those who want an explaination, because the application is using
AcadApplication events they have to be initialized which is what the
AcadStartup macro is doing.


--
Joe Sutphin

Want a VBA Macro Recorder With Source Code???
Find out how at joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source


Jon Baker wrote in message
news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> well i am not getting any real errors...
> i get this when first start acad:
> Regenerating model.
> Initializing VBA System...
> Loading VBA startup file...
>
> so i work for a while... save and close...
> nothing is in the outlook journal. i went in the journal settings and
> checked on AutoCAD drawing.
>
> --
> A2Ki, SurvCad CES, Win98 se
> Remove NO SPAM from my email address to email
>
> Jonathan J. Baker
> R&R Engineers-Surveyors, Inc.
> Denver, Colorado
> _________________________
> "Joe Sutphin" wrote in message
> news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > Jon,
> >
> > What is the program doing? Does it give you an error
> > message? If so, what does the error message say?
> >
> > Joe
> >
> > Jon Baker wrote in message
> > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > so i am wondering can anyone look at this code and see if they can get
> it
> > to
> > > work? this is not my code this is from the www.autojournal.net web
site.
> i
> > > do not know anything about vba so please, i beg, do not give me
> > explanations
> > > on why is does not work since i will not able to do anything with it
> info
> > > you provide.. thank you so much...
> > > ___________________________________________________
> > > 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
> > >
> > >
> > > --
> > > A2Ki, SurvCad CES, Win98 se
> > > Remove NO SPAM from my email address to email
> > >
> > > Jonathan J. Baker
> > > R&R Engineers-Surveyors, Inc.
> > > Denver, Colorado
> > > _________________________
> > >
> > >
> >
> >
>
>
0 Likes
Message 5 of 11

Anonymous
Not applicable
-VBARUN
Command: Initializing VBA System...
Macro name: ACADSTARTUP Execution error

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Joe Sutphin" wrote in message
news:6808B010AE2CCF96A2CAD8E7B4BC989A@in.WebX.maYIadrTaRb...
> Jon,
>
> I suspect that what you are not doing is running the AcadStartup macro.
>
> Do the following after you load the program.
>
> Type -vbarun at the AutoCAD command prompt
> Type acadstartup
>
> For those who want an explaination, because the application is using
> AcadApplication events they have to be initialized which is what the
> AcadStartup macro is doing.
>
>
> --
> Joe Sutphin
>
> Want a VBA Macro Recorder With Source Code???
> Find out how at joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
>
>
> Jon Baker wrote in message
> news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> > well i am not getting any real errors...
> > i get this when first start acad:
> > Regenerating model.
> > Initializing VBA System...
> > Loading VBA startup file...
> >
> > so i work for a while... save and close...
> > nothing is in the outlook journal. i went in the journal settings and
> > checked on AutoCAD drawing.
> >
> > --
> > A2Ki, SurvCad CES, Win98 se
> > Remove NO SPAM from my email address to email
> >
> > Jonathan J. Baker
> > R&R Engineers-Surveyors, Inc.
> > Denver, Colorado
> > _________________________
> > "Joe Sutphin" wrote in message
> > news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > > Jon,
> > >
> > > What is the program doing? Does it give you an error
> > > message? If so, what does the error message say?
> > >
> > > Joe
> > >
> > > Jon Baker wrote in message
> > > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > > so i am wondering can anyone look at this code and see if they can
get
> > it
> > > to
> > > > work? this is not my code this is from the www.autojournal.net web
> site.
> > i
> > > > do not know anything about vba so please, i beg, do not give me
> > > explanations
> > > > on why is does not work since i will not able to do anything with it
> > info
> > > > you provide.. thank you so much...
> > > > ___________________________________________________
> > > > 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
> > > >
> > > >
> > > > --
> > > > A2Ki, SurvCad CES, Win98 se
> > > > Remove NO SPAM from my email address to email
> > > >
> > > > Jonathan J. Baker
> > > > R&R Engineers-Surveyors, Inc.
> > > > Denver, Colorado
> > > > _________________________
> > > >
> > > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 6 of 11

Anonymous
Not applicable
Are you should that you have the application loaded?

Type _vbaload at the AutoCAD command prompt
Select the filename from the Open VBA Project dialog box
Type -vbarun
Type acadstartup

Joe

Jon Baker wrote in message
news:5530649DE46CC862A3CA1995D653B492@in.WebX.maYIadrTaRb...
> -VBARUN
> Command: Initializing VBA System...
> Macro name: ACADSTARTUP Execution error
>
> --
> A2Ki, SurvCad CES, Win98 se
> Remove NO SPAM from my email address to email
>
> Jonathan J. Baker
> R&R Engineers-Surveyors, Inc.
> Denver, Colorado
> _________________________
> "Joe Sutphin" wrote in message
> news:6808B010AE2CCF96A2CAD8E7B4BC989A@in.WebX.maYIadrTaRb...
> > Jon,
> >
> > I suspect that what you are not doing is running the AcadStartup macro.
> >
> > Do the following after you load the program.
> >
> > Type -vbarun at the AutoCAD command prompt
> > Type acadstartup
> >
> > For those who want an explaination, because the application is using
> > AcadApplication events they have to be initialized which is what the
> > AcadStartup macro is doing.
> >
> >
> > --
> > Joe Sutphin
> >
> > Want a VBA Macro Recorder With Source Code???
> > Find out how at joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
> >
> >
> > Jon Baker wrote in message
> > news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> > > well i am not getting any real errors...
> > > i get this when first start acad:
> > > Regenerating model.
> > > Initializing VBA System...
> > > Loading VBA startup file...
> > >
> > > so i work for a while... save and close...
> > > nothing is in the outlook journal. i went in the journal settings and
> > > checked on AutoCAD drawing.
> > >
> > > --
> > > A2Ki, SurvCad CES, Win98 se
> > > Remove NO SPAM from my email address to email
> > >
> > > Jonathan J. Baker
> > > R&R Engineers-Surveyors, Inc.
> > > Denver, Colorado
> > > _________________________
> > > "Joe Sutphin" wrote in message
> > > news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > > > Jon,
> > > >
> > > > What is the program doing? Does it give you an error
> > > > message? If so, what does the error message say?
> > > >
> > > > Joe
> > > >
> > > > Jon Baker wrote in message
> > > > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > > > so i am wondering can anyone look at this code and see if they can
> get
> > > it
> > > > to
> > > > > work? this is not my code this is from the www.autojournal.net web
> > site.
> > > i
> > > > > do not know anything about vba so please, i beg, do not give me
> > > > explanations
> > > > > on why is does not work since i will not able to do anything with
it
> > > info
> > > > > you provide.. thank you so much...
> > > > > ___________________________________________________
> > > > > 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
> > > > >
> > > > >
> > > > > --
> > > > > A2Ki, SurvCad CES, Win98 se
> > > > > Remove NO SPAM from my email address to email
> > > > >
> > > > > Jonathan J. Baker
> > > > > R&R Engineers-Surveyors, Inc.
> > > > > Denver, Colorado
> > > > > _________________________
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 7 of 11

Anonymous
Not applicable
yes i added it to my startup suite and i just did it like you said.. still:

Command: *Cancel*

Command: VBALOAD
Command: -VBARUN

Macro name: ACADSTARTUP
Execution error
Command: *Cancel*

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Joe Sutphin" wrote in message
news:0C2B33D83B477DE400A47F05D956CC00@in.WebX.maYIadrTaRb...
> Are you should that you have the application loaded?
>
> Type _vbaload at the AutoCAD command prompt
> Select the filename from the Open VBA Project dialog box
> Type -vbarun
> Type acadstartup
>
> Joe
>
> Jon Baker wrote in message
> news:5530649DE46CC862A3CA1995D653B492@in.WebX.maYIadrTaRb...
> > -VBARUN
> > Command: Initializing VBA System...
> > Macro name: ACADSTARTUP Execution error
> >
> > --
> > A2Ki, SurvCad CES, Win98 se
> > Remove NO SPAM from my email address to email
> >
> > Jonathan J. Baker
> > R&R Engineers-Surveyors, Inc.
> > Denver, Colorado
> > _________________________
> > "Joe Sutphin" wrote in message
> > news:6808B010AE2CCF96A2CAD8E7B4BC989A@in.WebX.maYIadrTaRb...
> > > Jon,
> > >
> > > I suspect that what you are not doing is running the AcadStartup
macro.
> > >
> > > Do the following after you load the program.
> > >
> > > Type -vbarun at the AutoCAD command prompt
> > > Type acadstartup
> > >
> > > For those who want an explaination, because the application is using
> > > AcadApplication events they have to be initialized which is what the
> > > AcadStartup macro is doing.
> > >
> > >
> > > --
> > > Joe Sutphin
> > >
> > > Want a VBA Macro Recorder With Source Code???
> > > Find out how at
joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
> > >
> > >
> > > Jon Baker wrote in message
> > > news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> > > > well i am not getting any real errors...
> > > > i get this when first start acad:
> > > > Regenerating model.
> > > > Initializing VBA System...
> > > > Loading VBA startup file...
> > > >
> > > > so i work for a while... save and close...
> > > > nothing is in the outlook journal. i went in the journal settings
and
> > > > checked on AutoCAD drawing.
> > > >
> > > > --
> > > > A2Ki, SurvCad CES, Win98 se
> > > > Remove NO SPAM from my email address to email
> > > >
> > > > Jonathan J. Baker
> > > > R&R Engineers-Surveyors, Inc.
> > > > Denver, Colorado
> > > > _________________________
> > > > "Joe Sutphin" wrote in message
> > > > news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > > > > Jon,
> > > > >
> > > > > What is the program doing? Does it give you an error
> > > > > message? If so, what does the error message say?
> > > > >
> > > > > Joe
> > > > >
> > > > > Jon Baker wrote in message
> > > > > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > > > > so i am wondering can anyone look at this code and see if they
can
> > get
> > > > it
> > > > > to
> > > > > > work? this is not my code this is from the www.autojournal.net
web
> > > site.
> > > > i
> > > > > > do not know anything about vba so please, i beg, do not give me
> > > > > explanations
> > > > > > on why is does not work since i will not able to do anything
with
> it
> > > > info
> > > > > > you provide.. thank you so much...
> > > > > > ___________________________________________________
> > > > > > 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
> > > > > >
> > > > > >
> > > > > > --
> > > > > > A2Ki, SurvCad CES, Win98 se
> > > > > > Remove NO SPAM from my email address to email
> > > > > >
> > > > > > Jonathan J. Baker
> > > > > > R&R Engineers-Surveyors, Inc.
> > > > > > Denver, Colorado
> > > > > > _________________________
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 8 of 11

Anonymous
Not applicable
This declaration

' Use with Application Event Examples
Public WithEvents ACADApp As AcadApplication

must be in a class module. The most obvious place for
it would be the ThisDrawing module.


--
Joe Sutphin

Want a VBA Macro Recorder With Source Code???
Find out how at joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source

Jon Baker wrote in message
news:4B637ABBC3639648BE16938789502AEB@in.WebX.maYIadrTaRb...
> yes i added it to my startup suite and i just did it like you said..
still:
>
> Command: *Cancel*
>
> Command: VBALOAD
> Command: -VBARUN
>
> Macro name: ACADSTARTUP
> Execution error
> Command: *Cancel*
>
> --
> A2Ki, SurvCad CES, Win98 se
> Remove NO SPAM from my email address to email
>
> Jonathan J. Baker
> R&R Engineers-Surveyors, Inc.
> Denver, Colorado
> _________________________
> "Joe Sutphin" wrote in message
> news:0C2B33D83B477DE400A47F05D956CC00@in.WebX.maYIadrTaRb...
> > Are you should that you have the application loaded?
> >
> > Type _vbaload at the AutoCAD command prompt
> > Select the filename from the Open VBA Project dialog box
> > Type -vbarun
> > Type acadstartup
> >
> > Joe
> >
> > Jon Baker wrote in message
> > news:5530649DE46CC862A3CA1995D653B492@in.WebX.maYIadrTaRb...
> > > -VBARUN
> > > Command: Initializing VBA System...
> > > Macro name: ACADSTARTUP Execution error
> > >
> > > --
> > > A2Ki, SurvCad CES, Win98 se
> > > Remove NO SPAM from my email address to email
> > >
> > > Jonathan J. Baker
> > > R&R Engineers-Surveyors, Inc.
> > > Denver, Colorado
> > > _________________________
> > > "Joe Sutphin" wrote in message
> > > news:6808B010AE2CCF96A2CAD8E7B4BC989A@in.WebX.maYIadrTaRb...
> > > > Jon,
> > > >
> > > > I suspect that what you are not doing is running the AcadStartup
> macro.
> > > >
> > > > Do the following after you load the program.
> > > >
> > > > Type -vbarun at the AutoCAD command prompt
> > > > Type acadstartup
> > > >
> > > > For those who want an explaination, because the application is using
> > > > AcadApplication events they have to be initialized which is what the
> > > > AcadStartup macro is doing.
> > > >
> > > >
> > > > --
> > > > Joe Sutphin
> > > >
> > > > Want a VBA Macro Recorder With Source Code???
> > > > Find out how at
> joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
> > > >
> > > >
> > > > Jon Baker wrote in message
> > > > news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> > > > > well i am not getting any real errors...
> > > > > i get this when first start acad:
> > > > > Regenerating model.
> > > > > Initializing VBA System...
> > > > > Loading VBA startup file...
> > > > >
> > > > > so i work for a while... save and close...
> > > > > nothing is in the outlook journal. i went in the journal settings
> and
> > > > > checked on AutoCAD drawing.
> > > > >
> > > > > --
> > > > > A2Ki, SurvCad CES, Win98 se
> > > > > Remove NO SPAM from my email address to email
> > > > >
> > > > > Jonathan J. Baker
> > > > > R&R Engineers-Surveyors, Inc.
> > > > > Denver, Colorado
> > > > > _________________________
> > > > > "Joe Sutphin" wrote in message
> > > > > news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > > > > > Jon,
> > > > > >
> > > > > > What is the program doing? Does it give you an error
> > > > > > message? If so, what does the error message say?
> > > > > >
> > > > > > Joe
> > > > > >
> > > > > > Jon Baker wrote in message
> > > > > > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > > > > > so i am wondering can anyone look at this code and see if they
> can
> > > get
> > > > > it
> > > > > > to
> > > > > > > work? this is not my code this is from the www.autojournal.net
> web
> > > > site.
> > > > > i
> > > > > > > do not know anything about vba so please, i beg, do not give
me
> > > > > > explanations
> > > > > > > on why is does not work since i will not able to do anything
> with
> > it
> > > > > info
> > > > > > > you provide.. thank you so much...
> > > > > > > ___________________________________________________
> > > > > > > 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
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > A2Ki, SurvCad CES, Win98 se
> > > > > > > Remove NO SPAM from my email address to email
> > > > > > >
> > > > > > > Jonathan J. Baker
> > > > > > > R&R Engineers-Surveyors, Inc.
> > > > > > > Denver, Colorado
> > > > > > > _________________________
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 9 of 11

Anonymous
Not applicable
okay... ummmm how can i do that?

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Joe Sutphin" wrote in message
news:8915BA0CAAD372445C8856AB19751407@in.WebX.maYIadrTaRb...
> This declaration
>
> ' Use with Application Event Examples
> Public WithEvents ACADApp As AcadApplication
>
> must be in a class module. The most obvious place for
> it would be the ThisDrawing module.
>
>
> --
> Joe Sutphin
>
> Want a VBA Macro Recorder With Source Code???
> Find out how at joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
>
> Jon Baker wrote in message
> news:4B637ABBC3639648BE16938789502AEB@in.WebX.maYIadrTaRb...
> > yes i added it to my startup suite and i just did it like you said..
> still:
> >
> > Command: *Cancel*
> >
> > Command: VBALOAD
> > Command: -VBARUN
> >
> > Macro name: ACADSTARTUP
> > Execution error
> > Command: *Cancel*
> >
> > --
> > A2Ki, SurvCad CES, Win98 se
> > Remove NO SPAM from my email address to email
> >
> > Jonathan J. Baker
> > R&R Engineers-Surveyors, Inc.
> > Denver, Colorado
> > _________________________
> > "Joe Sutphin" wrote in message
> > news:0C2B33D83B477DE400A47F05D956CC00@in.WebX.maYIadrTaRb...
> > > Are you should that you have the application loaded?
> > >
> > > Type _vbaload at the AutoCAD command prompt
> > > Select the filename from the Open VBA Project dialog box
> > > Type -vbarun
> > > Type acadstartup
> > >
> > > Joe
> > >
> > > Jon Baker wrote in message
> > > news:5530649DE46CC862A3CA1995D653B492@in.WebX.maYIadrTaRb...
> > > > -VBARUN
> > > > Command: Initializing VBA System...
> > > > Macro name: ACADSTARTUP Execution error
> > > >
> > > > --
> > > > A2Ki, SurvCad CES, Win98 se
> > > > Remove NO SPAM from my email address to email
> > > >
> > > > Jonathan J. Baker
> > > > R&R Engineers-Surveyors, Inc.
> > > > Denver, Colorado
> > > > _________________________
> > > > "Joe Sutphin" wrote in message
> > > > news:6808B010AE2CCF96A2CAD8E7B4BC989A@in.WebX.maYIadrTaRb...
> > > > > Jon,
> > > > >
> > > > > I suspect that what you are not doing is running the AcadStartup
> > macro.
> > > > >
> > > > > Do the following after you load the program.
> > > > >
> > > > > Type -vbarun at the AutoCAD command prompt
> > > > > Type acadstartup
> > > > >
> > > > > For those who want an explaination, because the application is
using
> > > > > AcadApplication events they have to be initialized which is what
the
> > > > > AcadStartup macro is doing.
> > > > >
> > > > >
> > > > > --
> > > > > Joe Sutphin
> > > > >
> > > > > Want a VBA Macro Recorder With Source Code???
> > > > > Find out how at
> > joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
> > > > >
> > > > >
> > > > > Jon Baker wrote in message
> > > > > news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> > > > > > well i am not getting any real errors...
> > > > > > i get this when first start acad:
> > > > > > Regenerating model.
> > > > > > Initializing VBA System...
> > > > > > Loading VBA startup file...
> > > > > >
> > > > > > so i work for a while... save and close...
> > > > > > nothing is in the outlook journal. i went in the journal
settings
> > and
> > > > > > checked on AutoCAD drawing.
> > > > > >
> > > > > > --
> > > > > > A2Ki, SurvCad CES, Win98 se
> > > > > > Remove NO SPAM from my email address to email
> > > > > >
> > > > > > Jonathan J. Baker
> > > > > > R&R Engineers-Surveyors, Inc.
> > > > > > Denver, Colorado
> > > > > > _________________________
> > > > > > "Joe Sutphin" wrote in message
> > > > > > news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > > > > > > Jon,
> > > > > > >
> > > > > > > What is the program doing? Does it give you an error
> > > > > > > message? If so, what does the error message say?
> > > > > > >
> > > > > > > Joe
> > > > > > >
> > > > > > > Jon Baker wrote in message
> > > > > > > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > > > > > > so i am wondering can anyone look at this code and see if
they
> > can
> > > > get
> > > > > > it
> > > > > > > to
> > > > > > > > work? this is not my code this is from the
www.autojournal.net
> > web
> > > > > site.
> > > > > > i
> > > > > > > > do not know anything about vba so please, i beg, do not give
> me
> > > > > > > explanations
> > > > > > > > on why is does not work since i will not able to do anything
> > with
> > > it
> > > > > > info
> > > > > > > > you provide.. thank you so much...
> > > > > > > > ___________________________________________________
> > > > > > > > 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
> > > > > > > >
> > > > > > > >
> > > > > > > > --
> > > > > > > > A2Ki, SurvCad CES, Win98 se
> > > > > > > > Remove NO SPAM from my email address to email
> > > > > > > >
> > > > > > > > Jonathan J. Baker
> > > > > > > > R&R Engineers-Surveyors, Inc.
> > > > > > > > Denver, Colorado
> > > > > > > > _________________________
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 10 of 11

Anonymous
Not applicable
has anyone figured this out yet... please i beg you...

--
A2Ki, SurvCad CES, Win98 se
Remove NO SPAM from my email address to email

Jonathan J. Baker
R&R Engineers-Surveyors, Inc.
Denver, Colorado
_________________________
"Jon Baker" wrote in message
news:A6C849FCBB8F2797C4ACD2E611CC5C0B@in.WebX.maYIadrTaRb...
> okay... ummmm how can i do that?
>
> --
> A2Ki, SurvCad CES, Win98 se
> Remove NO SPAM from my email address to email
>
> Jonathan J. Baker
> R&R Engineers-Surveyors, Inc.
> Denver, Colorado
> _________________________
> "Joe Sutphin" wrote in message
> news:8915BA0CAAD372445C8856AB19751407@in.WebX.maYIadrTaRb...
> > This declaration
> >
> > ' Use with Application Event Examples
> > Public WithEvents ACADApp As AcadApplication
> >
> > must be in a class module. The most obvious place for
> > it would be the ThisDrawing module.
> >
> >
> > --
> > Joe Sutphin
> >
> > Want a VBA Macro Recorder With Source Code???
> > Find out how at joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
> >
> > Jon Baker wrote in message
> > news:4B637ABBC3639648BE16938789502AEB@in.WebX.maYIadrTaRb...
> > > yes i added it to my startup suite and i just did it like you said..
> > still:
> > >
> > > Command: *Cancel*
> > >
> > > Command: VBALOAD
> > > Command: -VBARUN
> > >
> > > Macro name: ACADSTARTUP
> > > Execution error
> > > Command: *Cancel*
> > >
> > > --
> > > A2Ki, SurvCad CES, Win98 se
> > > Remove NO SPAM from my email address to email
> > >
> > > Jonathan J. Baker
> > > R&R Engineers-Surveyors, Inc.
> > > Denver, Colorado
> > > _________________________
> > > "Joe Sutphin" wrote in message
> > > news:0C2B33D83B477DE400A47F05D956CC00@in.WebX.maYIadrTaRb...
> > > > Are you should that you have the application loaded?
> > > >
> > > > Type _vbaload at the AutoCAD command prompt
> > > > Select the filename from the Open VBA Project dialog box
> > > > Type -vbarun
> > > > Type acadstartup
> > > >
> > > > Joe
> > > >
> > > > Jon Baker wrote in message
> > > > news:5530649DE46CC862A3CA1995D653B492@in.WebX.maYIadrTaRb...
> > > > > -VBARUN
> > > > > Command: Initializing VBA System...
> > > > > Macro name: ACADSTARTUP Execution error
> > > > >
> > > > > --
> > > > > A2Ki, SurvCad CES, Win98 se
> > > > > Remove NO SPAM from my email address to email
> > > > >
> > > > > Jonathan J. Baker
> > > > > R&R Engineers-Surveyors, Inc.
> > > > > Denver, Colorado
> > > > > _________________________
> > > > > "Joe Sutphin" wrote in message
> > > > > news:6808B010AE2CCF96A2CAD8E7B4BC989A@in.WebX.maYIadrTaRb...
> > > > > > Jon,
> > > > > >
> > > > > > I suspect that what you are not doing is running the AcadStartup
> > > macro.
> > > > > >
> > > > > > Do the following after you load the program.
> > > > > >
> > > > > > Type -vbarun at the AutoCAD command prompt
> > > > > > Type acadstartup
> > > > > >
> > > > > > For those who want an explaination, because the application is
> using
> > > > > > AcadApplication events they have to be initialized which is what
> the
> > > > > > AcadStartup macro is doing.
> > > > > >
> > > > > >
> > > > > > --
> > > > > > Joe Sutphin
> > > > > >
> > > > > > Want a VBA Macro Recorder With Source Code???
> > > > > > Find out how at
> > > joesu@worldnet.att.net?subject=VBA_Macro_Recorder_Source
> > > > > >
> > > > > >
> > > > > > Jon Baker wrote in message
> > > > > > news:B809FC37AA3D380A4A286CDFAC78E4E7@in.WebX.maYIadrTaRb...
> > > > > > > well i am not getting any real errors...
> > > > > > > i get this when first start acad:
> > > > > > > Regenerating model.
> > > > > > > Initializing VBA System...
> > > > > > > Loading VBA startup file...
> > > > > > >
> > > > > > > so i work for a while... save and close...
> > > > > > > nothing is in the outlook journal. i went in the journal
> settings
> > > and
> > > > > > > checked on AutoCAD drawing.
> > > > > > >
> > > > > > > --
> > > > > > > A2Ki, SurvCad CES, Win98 se
> > > > > > > Remove NO SPAM from my email address to email
> > > > > > >
> > > > > > > Jonathan J. Baker
> > > > > > > R&R Engineers-Surveyors, Inc.
> > > > > > > Denver, Colorado
> > > > > > > _________________________
> > > > > > > "Joe Sutphin" wrote in message
> > > > > > > news:3066EAECFC9B7716ACAF608949C4E07D@in.WebX.maYIadrTaRb...
> > > > > > > > Jon,
> > > > > > > >
> > > > > > > > What is the program doing? Does it give you an error
> > > > > > > > message? If so, what does the error message say?
> > > > > > > >
> > > > > > > > Joe
> > > > > > > >
> > > > > > > > Jon Baker wrote in
message
> > > > > > > > news:380DC65513659BD7799874AE3C025BBF@in.WebX.maYIadrTaRb...
> > > > > > > > > so i am wondering can anyone look at this code and see if
> they
> > > can
> > > > > get
> > > > > > > it
> > > > > > > > to
> > > > > > > > > work? this is not my code this is from the
> www.autojournal.net
> > > web
> > > > > > site.
> > > > > > > i
> > > > > > > > > do not know anything about vba so please, i beg, do not
give
> > me
> > > > > > > > explanations
> > > > > > > > > on why is does not work since i will not able to do
anything
> > > with
> > > > it
> > > > > > > info
> > > > > > > > > you provide.. thank you so much...
> > > > > > > > > ___________________________________________________
> > > > > > > > > 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
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --
> > > > > > > > > A2Ki, SurvCad CES, Win98 se
> > > > > > > > > Remove NO SPAM from my email address to email
> > > > > > > > >
> > > > > > > > > Jonathan J. Baker
> > > > > > > > > R&R Engineers-Surveyors, Inc.
> > > > > > > > > Denver, Colorado
> > > > > > > > > _________________________
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>
0 Likes
Message 11 of 11

Anonymous
Not applicable
Jon...I may be tripping over too much coffee but where do you get MyTime associated. I see it defined as an object but don't see anything else until it pushes you to Call ACADapp_EndOpen. You then use MyTime but that is before you Set MyOlApp and Set MyTime. Kind of confusing.

Good luck,

Bob Coward
CADS, Inc.
0 Likes