Discussion:
Saving Different in Visio 2003 than 2002?
(too old to reply)
DTran
2008-12-22 19:15:05 UTC
Permalink
Hi,

I'm trying to run a macro that worked perfectly in Visio 2002, but when I
run it in Visio 2003, it gives me this error:

"Run-time error '-2032465768 (86db0898)':

An exception occured."

That, or where it says "... An exception occured.", it will say "Cancel."
When I hit the "Debug" button, it's always highlighted to the line with
"variable.Save". So is saving in Visio 2003 different than saving in 2002?
Any insight?
Paul Herber
2008-12-22 19:59:18 UTC
Permalink
On Mon, 22 Dec 2008 11:15:05 -0800, DTran
Post by DTran
Hi,
I'm trying to run a macro that worked perfectly in Visio 2002, but when I
An exception occured."
That, or where it says "... An exception occured.", it will say "Cancel."
When I hit the "Debug" button, it's always highlighted to the line with
"variable.Save". So is saving in Visio 2003 different than saving in 2002?
Any insight?
in Visio 2003 save the file manually, ensure you save in Visio 2003
format, then try your macro. What might be happening is that the file
is in Visio 2000/2002 format and Visio is trying to ask you whether
you want to update the save format.
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.electronics.sandrila.co.uk/
DTran
2008-12-22 20:41:01 UTC
Permalink
Yes, that was exactly the problem. I just figured it out myself, but thank
you very much for the prompt reply.
Paul Herber
2008-12-22 20:57:21 UTC
Permalink
On Mon, 22 Dec 2008 12:41:01 -0800, DTran
Post by DTran
Yes, that was exactly the problem. I just figured it out myself, but thank
you very much for the prompt reply.
Marvellous!!!
--
Regards, Paul Herber, Sandrila Ltd.
Electrical for Visio http://www.electrical.sandrila.co.uk/
Jatin Sitapara
2012-01-13 06:21:58 UTC
Permalink
Hi,

I have developed a VB6 programme which is able to change the Fill Pattern of the shapes in a Visio Files.
But the problem is:
- I have to use Visio 2003.
- The files are ceated using Visio 2002.
- While running the code, it throws the error when I am using Application.AlretResponse to default save Current Version.
- It throws the error. "Cancel".
- I have to update thousands of Visio 2002 files, whose Fill Patterns needs to be updated. So don't want to save to files to Visio 2003 manually.
- I'll have to any how update/save these files to Visio 2003, programmatically.
- Any code in VBA or VB6 or VB.NET will help me a lot to proceed.

Please have a look into code below:

Sub ChangeFillPattern()

' Set numbers for each shape on all the pages of all the documents within a directory
' The changes are done in a temporary directory in case a problem arises.

Dim docObj As Visio.Document
Dim shpsObj As Visio.Shapes, shpObj As Visio.Shape
Dim i1 As Integer
Dim PathFileName As String, PathName As String, CurrFileName As String
Dim curPageIndx As Integer, curShapeIndx As Integer ' Loop variable
Dim ShapesCnt As Integer, ShapeLevel(200) As String

'On Error GoTo ErrHndlr:
'On Error Resume Next
' Set the default pathname
PathName = "C:\VisioTemp\"
PathFileName = PathName & "*.vsd"

' Find the first file from the directory (not necessarily the first alphabetically)
CurrFileName = Dir(PathFileName)

Do While CurrFileName <> ""

' Open the file
PathFileName = PathName & CurrFileName
Set docObj = Documents.Open(PathFileName)
Set pagsObj = docObj.Pages

docObj.Application.AlertResponse = 6
docObj.Save
docObj.Close

CurrFileName = Dir
Loop

'ErrHndlr:
'MsgBox Err.Description
End Sub
Post by DTran
Hi,
I'm trying to run a macro that worked perfectly in Visio 2002, but when I
An exception occured."
That, or where it says "... An exception occured.", it will say "Cancel."
When I hit the "Debug" button, it's always highlighted to the line with
"variable.Save". So is saving in Visio 2003 different than saving in 2002?
Any insight?
Post by Paul Herber
On Mon, 22 Dec 2008 11:15:05 -0800, DTran
in Visio 2003 save the file manually, ensure you save in Visio 2003
format, then try your macro. What might be happening is that the file
is in Visio 2000/2002 format and Visio is trying to ask you whether
you want to update the save format.
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.electronics.sandrila.co.uk/
Post by DTran
Yes, that was exactly the problem. I just figured it out myself, but thank
you very much for the prompt reply.
Post by Paul Herber
Marvellous!!!
--
Regards, Paul Herber, Sandrila Ltd.
Electrical for Visio http://www.electrical.sandrila.co.uk/
Paul Herber
2012-01-13 10:31:43 UTC
Permalink
Post by Jatin Sitapara
Hi,
I have developed a VB6 programme which is able to change the Fill Pattern of the shapes in a Visio Files.
These newsgroups are no longer in use and it is unlikely that you will get an answer here.
There are replacement forums for Visio, Microsoft's own:
http://social.technet.microsoft.com/Forums/en-US/visiogeneral/threads
http://answers.microsoft.com/en-us/office/forum/visio?page=1&tab=all

or Visio MVP VisioGuy
http://www.visguy.com/vgforum/
--
Regards, Paul Herber, Sandrila Ltd.
Electronics for Visio http://www.sandrila.co.uk/visio-electronics/
Electrical for Visio http://www.sandrila.co.uk/visio-electrical/
Electronics Packages for Visio http://www.sandrila.co.uk/visio-electronics-packages/
Loading...