What am I missing?

What am I missing?

Anonymous
Not applicable
275 Views
1 Reply
Message 1 of 2

What am I missing?

Anonymous
Not applicable
I have a private
Private sDocDisplayName As String

and then in the form load I do the following

sDocDisplayName = ThisApplication.ActiveDocument.DisplayName
Set oFilePropReader = New DSOleFile.PropertyReader
On Error Resume Next
Set oDocProp = oFilePropReader.GetDocumentProperties(sDocDisplayName)

It all works for a while, but as I load and unload files it will inevitably end up
getting errors on the Set oDocProp line. Once it does, the only way to get it
working again seems to be to unload all drawings and then reload them.

In my "Cancel" button I have added
Set oDocProp = Nothing
Set oFilePropReader = Nothing
End

But it didn't make any difference.

I am not sure but it appears to happen more often if I am working with assemblies!

anyone have any ideas?


--
Kent Keller
http://kwik-mcad.scriptmania.com/
0 Likes
276 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Sounds like your Microsoft component has some bugs in it.

--
Good judgment comes from experience.
Experience comes from bad judgment.

http://www.acadx.com


"Kent Keller" wrote in message
news:D6F30D64770DC858C32D652CD5E4E55F@in.WebX.maYIadrTaRb...
> I have a private
> Private sDocDisplayName As String
>
> and then in the form load I do the following
>
> sDocDisplayName = ThisApplication.ActiveDocument.DisplayName
> Set oFilePropReader = New DSOleFile.PropertyReader
> On Error Resume Next
> Set oDocProp = oFilePropReader.GetDocumentProperties(sDocDisplayName)
>
> It all works for a while, but as I load and unload files it will
inevitably end up
> getting errors on the Set oDocProp line. Once it does, the only way to
get it
> working again seems to be to unload all drawings and then reload them.
>
> In my "Cancel" button I have added
> Set oDocProp = Nothing
> Set oFilePropReader = Nothing
> End
>
> But it didn't make any difference.
>
> I am not sure but it appears to happen more often if I am working with
assemblies!
>
> anyone have any ideas?
>
>
> --
> Kent Keller
> http://kwik-mcad.scriptmania.com/
>
>
>
0 Likes