Error attempting to save changes to a Stencil

G

Grandpa Steve

Hi,
When I make changes to a stencil (create or edit a master), on trying to
save the changes, the process times out and I get the following message:
"An error (1506) occurred during the action Save. DOS Invalid handle."

This is a real bummer because once it has occurred, it persists across
sessions, and the only way I've found to stop it is to reboot my machine!!

I'm using Visio 2003 SP2 on XP Pro SP2.
I'm developing a COM Add-In in C#, which loads at Visio startup. Have tried
removing this in case it was causing some sort of conflict, but my issue
persists!

Any ideas would be appreciated as this is seriously affecting my
productivity!!
Thanks.
 
J

JuneTheSecond

Did you opene stencil for read & write mode?
For example in VBA,,,
Documents.OpenEx "MyStencil.vss", visOpenDocked + visOpenRW
 
G

Grandpa Steve

Sorry, I should have clarified:
This error occurs when I make Manual changes to masters in my stencil.
I'm using the standard Visio interface (obviously with Visio 2003 SDK
installed).
I select the master in my stencil, click "edit master", make my changes,
then close the shapesheet, and close the shape edit window to update the
master.
Finally I click "File: Save" to save my changes to the stencil file. This
is when the error occurs.

My COM AddIn does not edit masters, it just references them to
automatically drop shapes on the page.

Thanks.
 
P

Paul Herber

Hi,
When I make changes to a stencil (create or edit a master), on trying to
save the changes, the process times out and I get the following message:
"An error (1506) occurred during the action Save. DOS Invalid handle."

Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
G

Grandpa Steve

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes
 
P

Paul Herber

Does [user] have administrator rights?
C:\Documents and Settings\ [user] \My Documents\My Shapes is a system
folder, try copying the file to somewhere else and trying from there.
Is the file write protected? (I'm clutching at straws here.)

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes


Paul Herber said:
Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
P

Paul Herber

Something else:
menu Options -> Advanced.
Record actions in Microsoft Office Outlook journal
set to off

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes


Paul Herber said:
Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
G

Grandpa Steve

Yes, that is how I have it set.

I have noticed something else which may be related:

If I close Visio, then try to move or rename my stencil, I get a dialogue
something like "Cannot complete this action because the file is in use by
another program".
Which it clearly isn't.
I have checked Task Manager to see if a Visio process is still running, but
there doesn't appear to be anything (unless it's called something unhelpful
like "CVUSSF.EXE") !




Paul Herber said:
Something else:
menu Options -> Advanced.
Record actions in Microsoft Office Outlook journal
set to off

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes


Paul Herber said:
On Mon, 15 Oct 2007 02:43:02 -0700, Grandpa Steve

Hi,
When I make changes to a stencil (create or edit a master), on trying to
save the changes, the process times out and I get the following message:
"An error (1506) occurred during the action Save. DOS Invalid handle."

Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
P

Paul Herber

What happens if you copy the file somewhere else and edit it?
Just plain C:\Documents and Settings\ [user] \My Documents\
perhaps or another folder.


Yes, that is how I have it set.

I have noticed something else which may be related:

If I close Visio, then try to move or rename my stencil, I get a dialogue
something like "Cannot complete this action because the file is in use by
another program".
Which it clearly isn't.
I have checked Task Manager to see if a Visio process is still running, but
there doesn't appear to be anything (unless it's called something unhelpful
like "CVUSSF.EXE") !




Paul Herber said:
Something else:
menu Options -> Advanced.
Record actions in Microsoft Office Outlook journal
set to off

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes


:

On Mon, 15 Oct 2007 02:43:02 -0700, Grandpa Steve

Hi,
When I make changes to a stencil (create or edit a master), on trying to
save the changes, the process times out and I get the following message:
"An error (1506) occurred during the action Save. DOS Invalid handle."

Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
A

Al Edlund

That's not an unusual by product if an add-in has difficulty and terminates
abnormally.
Al

Grandpa Steve said:
Yes, that is how I have it set.

I have noticed something else which may be related:

If I close Visio, then try to move or rename my stencil, I get a dialogue
something like "Cannot complete this action because the file is in use by
another program".
Which it clearly isn't.
I have checked Task Manager to see if a Visio process is still running, but
there doesn't appear to be anything (unless it's called something unhelpful
like "CVUSSF.EXE") !




Paul Herber said:
Something else:
menu Options -> Advanced.
Record actions in Microsoft Office Outlook journal
set to off

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes


:

On Mon, 15 Oct 2007 02:43:02 -0700, Grandpa Steve

Hi,
When I make changes to a stencil (create or edit a master), on trying to
save the changes, the process times out and I get the following message:
"An error (1506) occurred during the action Save. DOS Invalid handle."

Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
G

Grandpa Steve

This issue [seems] to happen at random times. I can make a small change to a
stencil master, and save it ok (I've gotten into this habbit to lessen my
screams when the error occurs!!)

I am not running any AddIn when the error occurs.
In fact, I have uninstalled my AddIn, and checked it is not running in
Visio Tools\Macros\COM AddIns...
If a previous abnormal AddIn termination had corrupted the stencil, surely
it would _always_ display this problem?

BTW copying the file may get me going again without needing to reboot (I'll
try this next time it happens) but I'd still lose my (unsaved) changes, so
it's not really a solution!

Thanks again.


Al Edlund said:
That's not an unusual by product if an add-in has difficulty and terminates
abnormally.
Al

Grandpa Steve said:
Yes, that is how I have it set.

I have noticed something else which may be related:

If I close Visio, then try to move or rename my stencil, I get a dialogue
something like "Cannot complete this action because the file is in use by
another program".
Which it clearly isn't.
I have checked Task Manager to see if a Visio process is still running, but
there doesn't appear to be anything (unless it's called something unhelpful
like "CVUSSF.EXE") !




Paul Herber said:
Something else:
menu Options -> Advanced.
Record actions in Microsoft Office Outlook journal
set to off

On Mon, 15 Oct 2007 04:44:01 -0700, Grandpa Steve

Ah, I thought you were onto something there!
But the file is on my local Hard Drive, in the default Visio stencils folder:-
C:\Documents and Settings\ [user] \My Documents\My Shapes


:

On Mon, 15 Oct 2007 02:43:02 -0700, Grandpa Steve

Hi,
When I make changes to a stencil (create or edit a master), on trying to
save the changes, the process times out and I get the following message:
"An error (1506) occurred during the action Save. DOS Invalid handle."

Is this on a network drive or a USB drive or similar?
If so, try on a different drive type.
 
G

Grandpa Steve

For anyone who may be interested, I have moved my stencil file to a
different folder on my hard drive ( C:\Visio\ ) and so far (1 day) I have not
had a recurrence the problem.

If this holds, it would appear that there's an undocumented feature of
Visio 2003 which basically goes: "Don't develop stencil masters when the
stencil file is stored in the default Users Personal Data Folder: My
Documents \ My Shapes, as Visio may lose the reference to the stencil file
being edited, thus locking the file to any changes until the operating system
is restarted."
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top