Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. visio org chart shapes are not well formated on its position by using VS.Net

visio org chart shapes are not well formated on its position by using VS.Net

Scheduled Pinned Locked Moved Visual Basic
helpcsharphtmldatabase
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    memoboy
    wrote on last edited by
    #1

    I’m working on creating a Visio 2003 organization chart over .net, I have been code it by using VB.Net 2005. What I’m trying to do is to retrieve the organization chart hierarchical from the database and store it as an html web page. I have been used the organization chart wizard for creating the chart shapes and I used VisSaveAsWeb object to save the chart as a web page. My problem is that the org chart shapes doesn’t formatted correctly after resizing the shapes to fit with it text. Is there any one know how could I control the shape position to relocate it into it right place and this is my peace of code Code Block 'On Error GoTo OrgDoItErrHandler Dim objVisio As Visio.Application Dim objAddOn As Visio.Addon Dim vsoSaveAsWeb As VisSaveAsWeb Dim vsoWebSettings As VisWebPageSettings Dim strCommand As String Dim i As Integer Dim pagObj As Visio.Page Dim shpObj As Visio.Shape Dim celObjHeight As Visio.Cell Dim celObjWidth As Visio.Cell strCommand = "/DATASOURCE=SN,TABLE=" _ & "~" & ",DBQUALIFIER=~" _ & " /NAME-FIELD=~" _ & " /UNIQUEID-FIELD=~" _ & " /MANAGER-FIELD=~" _ & " /DISPLAY-FIELDS=~" _ & " /CUSTOM-PROPERTY-FIELDS=~" _ & " /SHAPE-FIELD=~" objVisio = New Visio.InvisibleApp objAddOn = objVisio.Addons.ItemU("OrgCWiz") 'Run the add-on (errors are handled by the add-on) On Error Resume Next 'Break up the string Dim strCommandPart As String Dim strCommandLeft As String strCommandLeft = strCommand objAddOn.Run("/S-INIT") While (Len(strCommandLeft) > 0) strCommandPart = Microsoft.VisualBasic.Left(strCommandLeft, MAX_ARGSTRING_LENGTH) strCommandLeft = Mid(strCommandLeft, Len(strCommandPart) + 1) objAddOn.Run("/S-ARGSTR " + strCommandPart) End While objAddOn.Run("/S-RUN " + strCommandLeft) ' Get a VisSaveAsWeb object that ' represents a new Web page project. vsoSaveAsWeb = objVisio.Application.SaveAsWebObject ' Get a VisWebPageSettings object. vsoWebSettings = vsoSaveAsWeb.WebPageSettings ' Configure preferences. With vsoWebSettings .StartPage = 1 .EndPage = 2 .QuietMode = True .TargetPath = "D:\Balaji\Test.htm" .SilentMode = True End With pagObj = objVisio.ActivePage ' I’m trying here to resize the shaps to fet with the texts that inside it For i = 0 To pagObj.Shapes.Count If pagObj.Shapes.Item

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups