How to determine if Visio 2003 is installed.

G

GMR

I need to determine at runtime (VB6) if Visio 2003 is installed. Does
anyone know if checking for the presence of the
"SOFTWARE\Microsoft\Office\11.0\Visio" registry key will do this
accurately? Is there a better way to check for it being installed?

Thanks in advance,

Glen
 
R

Ralle

To determine if any Visio version is installed you can use:
....
On Error Resume Next
Dim visObj As Visio.Application
Set visObj = GetObject( "Visio.Application")
If appObj Is Nothing Then
.....
If you like to get an invisible object you can replace "Visio.Application"
by "Visio.InvisibleApp".

The current version you can get by "Visio.Application.Version".

Ralph
 
M

Murali Mohan P

I want to print the SVG Document in VB.Net by using the Visio. Document Component.

=


Please check the Process :

=


Step 1 : Create SVG File in C drive. (C:\Block.svg). =


Note : Please copy the following xml tags in new text document and save as SVG file. =E2=
=80=9CBlock.svg=E2=80=9D

=


<?xml version=3D"1.0" encoding=3D"UTF-8" standalone=3D"no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC=
-SVG-20010904/DTD/svg10.dtd">

<!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 B5.svg Page-1 -->

<svg xmlns=3D"http://www.w3.org/2000/svg" xmlns:v=3D"http://schemas.micro=
soft.com/visio/2003/SVGExtensions/" width=3D"8.5in"

height=3D"11in" viewBox=3D"0 0 612 792" xml:space=3D"preserve" color-interpol=
ation-filters=3D"sRGB" class=3D"st1">

<v:documentProperties v:langID=3D"1033" v:viewMarkup=3D"false"/>

=


<style type=3D"text/css">

<![CDATA[

.st1 {fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-l=
inecap:square;stroke-miterlimit:3}

.st2 {fill:#e8eef7;stroke:#000000;stroke-linecap:round;stroke-linejoin:r=
ound;stroke-width:0.24}

]]>

</style>

=


<defs id=3D"Masters">

<symbol id=3D"master0" v:mID=3D"0" class=3D"st1">

<title>Square</title>

<g id=3D"master-shape5-2" v:mID=3D"5" v:groupContext=3D"shape">

<title>Sheet.5</title>

<v:userDefs>

<v:ud v:nameU=3D"visVersion" v:val=3D"VT0(11):26"/>

</v:userDefs>

<rect x=3D"0" y=3D"684" width=3D"108" height=3D"108" class=3D"st2"/>

</g>

</symbol>

</defs>

<g v:mID=3D"0" v:index=3D"1" v:groupContext=3D"foregroundPage">

<v:userDefs>

<v:ud v:nameU=3D"SchemeName" v:val=3D"VT4(Default)"/>

</v:userDefs>

<title>Page-1</title>

<v:pageProperties v:drawingScale=3D"1" v:pageScale=3D"1" v:drawingUnits=3D=
"0" v:shadowOffsetX=3D"9" v:shadowOffsetY=3D"-9"/>

<v:layer v:name=3D"Connector" v:index=3D"0"/>

<use id=3D"shape1-1" v:mID=3D"1" xlink:href=3D"#master0" transform=3D"trans=
late(72,-648)">

<title>Square</title>

</use>

</g>

</svg>

=


Step 2: Create new VB.Net Project and copy following code in form.

=


Dim objApp As New Visio.InvisibleApp

Dim objDoc As Visio.Document

objDoc =3D objApp.Documents.Open(=E2=80=9CC:\Block.svg=E2=80=9D)

=


=E2=80=98If I can print by using =E2=80=9CHP LaserJet 5000 Series PCL=E2=80=9D. I a=
m unable to print by using Microsoft Office Document Image Writer or PDF Type one.

objDoc.Printer =3D =E2=80=9CMicrosoft Office Document Image Writer=E2=80=9D =E2=
=80=98 or PDF

=


objDoc.PrintFitOnPages =3D True

objDoc.PrintOut(Visio.VisPrintOutRange.visPrintCurrentPage, , , , , True, =E2=
=80=9CBlock=E2=80=9D)

objApp.ActiveDocument.Saved =3D True

objApp.ActiveDocument.Close()

objApp.Quit()

objApp =3D Nothing

objDoc =3D Nothing

=


If I do like this I could able to save/print the file, but it is saving in System32 Folde=
r (E.g.: C:\WINDOWS\system32\Block.mdi). I want to save this file in specified fol=
der; I want to know how to specify the folder.

=


Please assist me, How to solve this problem. =


=


If we couldn=E2=80=99t do by using the above process, please let me know the process.=
 
A

Al Edlund

when i looked at the printer properties it has a default folder specified,
you might consider changing it.
al

I want to print the SVG Document in VB.Net by using the Visio. Document
Component.



Please check the Process :



Step 1 : Create SVG File in C drive. (C:\Block.svg).

Note : Please copy the following xml tags in new text document and save as
SVG file. "Block.svg"



<?xml version="1.0" encoding="UTF-8" standalone="no"?>

<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">

<!-- Generated by Microsoft Visio 11.0, SVG Export, v1.0 B5.svg Page-1 -->

<svg xmlns="http://www.w3.org/2000/svg"
xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/"
width="8.5in"

height="11in" viewBox="0 0 612 792"
xml:space="preserve" color-interpolation-filters="sRGB" class="st1">

<v:documentProperties v:langID="1033" v:viewMarkup="false"/>



<style type="text/css">

<![CDATA[

.st1
{fill:none;fill-rule:evenodd;font-size:12;overflow:visible;stroke-linecap:square;stroke-miterlimit:3}

.st2
{fill:#e8eef7;stroke:#000000;stroke-linecap:round;stroke-linejoin:round;stroke-width:0.24}

]]>

</style>



<defs id="Masters">

<symbol id="master0" v:mID="0" class="st1">

<title>Square</title>

<g id="master-shape5-2"
v:mID="5" v:groupContext="shape">

<title>Sheet.5</title>

<v:userDefs>


<v:ud v:nameU="visVersion" v:val="VT0(11):26"/>

</v:userDefs>

<rect x="0"
y="684" width="108" height="108" class="st2"/>

</g>

</symbol>

</defs>

<g v:mID="0" v:index="1" v:groupContext="foregroundPage">

<v:userDefs>

<v:ud v:nameU="SchemeName"
v:val="VT4(Default)"/>

</v:userDefs>

<title>Page-1</title>

<v:pageProperties v:drawingScale="1"
v:pageScale="1" v:drawingUnits="0" v:shadowOffsetX="9"
v:shadowOffsetY="-9"/>

<v:layer v:name="Connector" v:index="0"/>

<use id="shape1-1" v:mID="1"
xlink:href="#master0" transform="translate(72,-648)">

<title>Square</title>

</use>

</g>

</svg>



Step 2: Create new VB.Net Project and copy following code in form.



Dim objApp As New Visio.InvisibleApp

Dim objDoc As Visio.Document

objDoc = objApp.Documents.Open("C:\Block.svg")



'If I can print by using "HP LaserJet 5000 Series PCL". I am unable
to print by using Microsoft Office Document Image Writer or PDF Type one.

objDoc.Printer = "Microsoft Office Document Image Writer" ' or PDF



objDoc.PrintFitOnPages = True

objDoc.PrintOut(Visio.VisPrintOutRange.visPrintCurrentPage, , , , ,
True, "Block")

objApp.ActiveDocument.Saved = True

objApp.ActiveDocument.Close()

objApp.Quit()

objApp = Nothing

objDoc = Nothing



If I do like this I could able to save/print the file, but it is saving in
System32 Folder (E.g.: C:\WINDOWS\system32\Block.mdi). I want to save this
file in specified folder; I want to know how to specify the folder.



Please assist me, How to solve this problem.



If we couldn't do by using the above process, please let me know the
process.
 

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