K
Kevin James
Hi all,
I'm trying to automate a Visio task (Visio2000 SP1) of importing a graphic
into a new Visio document, but I'm always running into the same problem when
I try to close the document.
the general pseudocode is as follows:
1. Open a template file document into a Document object
2. Import a new graphic into it (either a .jpg or a .bmp)
3. Save the import to a new file (objDocument.SaveAs
"c:\imports\newdoc.vsd")
4. Close the document (objDocument.Close)
No matter what I try in Step 4, I keep coming up with a yes/no/cancel dialog
box "Save Changes to newdoc.vsd?", even though I just saved it in Step 3 and
did nothing to that saved document prior to closing the document.
I've tried setting the Document's .Saved property = True just before the
..Close method, but Visio seems to ignore this.
The only other thing I can think of that is that I'm trying to save the
document into Visio 5 format (it's a backward-compatible requirement for this
particular application), and Visio wants to save it to it's native Visio2000
format. Could this be an issue here? I'm quickly running out of ideas...
Thanks in advanced for some possible direction,
Kevin James
I'm trying to automate a Visio task (Visio2000 SP1) of importing a graphic
into a new Visio document, but I'm always running into the same problem when
I try to close the document.
the general pseudocode is as follows:
1. Open a template file document into a Document object
2. Import a new graphic into it (either a .jpg or a .bmp)
3. Save the import to a new file (objDocument.SaveAs
"c:\imports\newdoc.vsd")
4. Close the document (objDocument.Close)
No matter what I try in Step 4, I keep coming up with a yes/no/cancel dialog
box "Save Changes to newdoc.vsd?", even though I just saved it in Step 3 and
did nothing to that saved document prior to closing the document.
I've tried setting the Document's .Saved property = True just before the
..Close method, but Visio seems to ignore this.
The only other thing I can think of that is that I'm trying to save the
document into Visio 5 format (it's a backward-compatible requirement for this
particular application), and Visio wants to save it to it's native Visio2000
format. Could this be an issue here? I'm quickly running out of ideas...
Thanks in advanced for some possible direction,
Kevin James