Bonjour,
J'aimerais savoir si c'est possible de créer dynamiquement des organigrammes
dans visio 2003 pro à partir de ms access XP ? Je ne veux pas utiliser
l'assitant dans Visio. Je veux créer vraiment à partir de ACCESS. J'ai
réussi à date à faire ouvrir Visio à partir de lignes de commandes dnas
ACCESS (youhou!) mais je ne sais pas trop quoi faire par la suite!
Quelqu'un l'a déja fait??
Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
Bonjour
"Julie Morin" a écrit dans le message de news:
| Bonjour, | J'aimerais savoir si c'est possible de créer dynamiquement des organigrammes | dans visio 2003 pro à partir de ms access XP ? Je ne veux pas utiliser | l'assitant dans Visio. Je veux créer vraiment à partir de ACCESS. J'ai | réussi à date à faire ouvrir Visio à partir de lignes de commandes dnas | ACCESS (youhou!) mais je ne sais pas trop quoi faire par la suite! | Quelqu'un l'a déja fait?? | | Merci beaucoup, | Jue
Par automation, tu trouveras plein d'exemples comme celui-ci dans : http://groups.google.com/groups?hl=fr&lr=&group=microsoft.public.visio.developer.vba
Option Compare Database Option Explicit
Dim AppVisio As Visio.Application
Function fMakeChart()
Dim AppVisio As Object Dim DocsObj As Visio.Document Dim docObj As Visio.Document Dim pagsObj As Visio.Pages Dim pagObj As Visio.Page Dim shpObj As Visio.Shape Dim shpConn As Visio.Shape Dim celObj As Visio.Cell Dim pathname As String Dim MasterShape As String Dim intLength As Integer
pathname = "G:MIS_DevelopmentOrgChartsOrgChart.bat" ShellWait pathname, 6 ' runs the org chart wizard via batch file
' Takes control of the org chart produced by the wizard Set AppVisio = GetObject(, "Visio.Application") Set docObj = AppVisio.ActiveDocument docObj.Application.DoCmd visCmdCenterDrawing
' Resizes the fonts to 6 points. For Each pagObj In docObj.Pages For Each shpObj In pagObj.Shapes
If shpObj.Name = "Executive" Then shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 0 shpObj.Cells("Width").Formula = "1.15" shpObj.Cells("Height").Formula = ".5" ElseIf shpObj.Text Like "*Manager*" Then shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 2 shpObj.Cells("Width").Formula = "1" shpObj.Cells("Height").Formula = ".275" shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 2 & 3 Else: If shpObj.Cells("Width").Formula Like "*GUARD*" = False Then shpObj.Cells("Width").Formula = ".975" shpObj.Cells("Height").Formula = ".125" shpObj.Cells("para.HorzAlign") = 0 ' Align Text Left End If If shpObj.Text Like "*Director*" = False Or shpObj.Text Like "*Manager*" = False Then intLength = InStr(1, shpObj.Text, Chr(10)) ' line feed If intLength <> 0 Then shpObj.Text = Mid(shpObj.Text, 1, intLength - 1) 'cuts off everything 1 character before line feed End If End If End If
shpObj.Cells("Char.Size[1]").Formula = "= 6 pt."
Next Next
End Function
à+
-- Bonjour,
Tu auras plus de chances d'obtenir une réponse adaptée en posant ta question sur le forum approprié, à savoir :
"Julie Morin" <JulieMorin@discussions.microsoft.com> a écrit dans le message de news:
002E6C88-9CBB-4940-A409-CE4F720E5FB0@microsoft.com...
| Bonjour,
| J'aimerais savoir si c'est possible de créer dynamiquement des organigrammes
| dans visio 2003 pro à partir de ms access XP ? Je ne veux pas utiliser
| l'assitant dans Visio. Je veux créer vraiment à partir de ACCESS. J'ai
| réussi à date à faire ouvrir Visio à partir de lignes de commandes dnas
| ACCESS (youhou!) mais je ne sais pas trop quoi faire par la suite!
| Quelqu'un l'a déja fait??
|
| Merci beaucoup,
| Jue
Par automation, tu trouveras plein d'exemples comme celui-ci dans :
http://groups.google.com/groups?hl=fr&lr=&group=microsoft.public.visio.developer.vba
Option Compare Database
Option Explicit
Dim AppVisio As Visio.Application
Function fMakeChart()
Dim AppVisio As Object
Dim DocsObj As Visio.Document
Dim docObj As Visio.Document
Dim pagsObj As Visio.Pages
Dim pagObj As Visio.Page
Dim shpObj As Visio.Shape
Dim shpConn As Visio.Shape
Dim celObj As Visio.Cell
Dim pathname As String
Dim MasterShape As String
Dim intLength As Integer
pathname = "G:MIS_DevelopmentOrgChartsOrgChart.bat"
ShellWait pathname, 6 ' runs the org chart wizard via batch file
' Takes control of the org chart produced by the wizard
Set AppVisio = GetObject(, "Visio.Application")
Set docObj = AppVisio.ActiveDocument
docObj.Application.DoCmd visCmdCenterDrawing
' Resizes the fonts to 6 points.
For Each pagObj In docObj.Pages
For Each shpObj In pagObj.Shapes
If shpObj.Name = "Executive" Then
shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 0
shpObj.Cells("Width").Formula = "1.15"
shpObj.Cells("Height").Formula = ".5"
ElseIf shpObj.Text Like "*Manager*" Then
shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 2
shpObj.Cells("Width").Formula = "1"
shpObj.Cells("Height").Formula = ".275"
shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 2 & 3
Else:
If shpObj.Cells("Width").Formula Like "*GUARD*" = False Then
shpObj.Cells("Width").Formula = ".975"
shpObj.Cells("Height").Formula = ".125"
shpObj.Cells("para.HorzAlign") = 0 ' Align Text Left
End If
If shpObj.Text Like "*Director*" = False Or shpObj.Text Like "*Manager*"
= False Then
intLength = InStr(1, shpObj.Text, Chr(10)) ' line feed
If intLength <> 0 Then
shpObj.Text = Mid(shpObj.Text, 1, intLength - 1) 'cuts off
everything 1 character before line feed
End If
End If
End If
shpObj.Cells("Char.Size[1]").Formula = "= 6 pt."
Next
Next
End Function
à+
--
Bonjour,
Tu auras plus de chances d'obtenir une réponse adaptée
en posant ta question sur le forum approprié, à savoir :
| Bonjour, | J'aimerais savoir si c'est possible de créer dynamiquement des organigrammes | dans visio 2003 pro à partir de ms access XP ? Je ne veux pas utiliser | l'assitant dans Visio. Je veux créer vraiment à partir de ACCESS. J'ai | réussi à date à faire ouvrir Visio à partir de lignes de commandes dnas | ACCESS (youhou!) mais je ne sais pas trop quoi faire par la suite! | Quelqu'un l'a déja fait?? | | Merci beaucoup, | Jue
Par automation, tu trouveras plein d'exemples comme celui-ci dans : http://groups.google.com/groups?hl=fr&lr=&group=microsoft.public.visio.developer.vba
Option Compare Database Option Explicit
Dim AppVisio As Visio.Application
Function fMakeChart()
Dim AppVisio As Object Dim DocsObj As Visio.Document Dim docObj As Visio.Document Dim pagsObj As Visio.Pages Dim pagObj As Visio.Page Dim shpObj As Visio.Shape Dim shpConn As Visio.Shape Dim celObj As Visio.Cell Dim pathname As String Dim MasterShape As String Dim intLength As Integer
pathname = "G:MIS_DevelopmentOrgChartsOrgChart.bat" ShellWait pathname, 6 ' runs the org chart wizard via batch file
' Takes control of the org chart produced by the wizard Set AppVisio = GetObject(, "Visio.Application") Set docObj = AppVisio.ActiveDocument docObj.Application.DoCmd visCmdCenterDrawing
' Resizes the fonts to 6 points. For Each pagObj In docObj.Pages For Each shpObj In pagObj.Shapes
If shpObj.Name = "Executive" Then shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 0 shpObj.Cells("Width").Formula = "1.15" shpObj.Cells("Height").Formula = ".5" ElseIf shpObj.Text Like "*Manager*" Then shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 2 shpObj.Cells("Width").Formula = "1" shpObj.Cells("Height").Formula = ".275" shpObj.Cells("prop.ChildLayoutStyle").ResultIU = 2 & 3 Else: If shpObj.Cells("Width").Formula Like "*GUARD*" = False Then shpObj.Cells("Width").Formula = ".975" shpObj.Cells("Height").Formula = ".125" shpObj.Cells("para.HorzAlign") = 0 ' Align Text Left End If If shpObj.Text Like "*Director*" = False Or shpObj.Text Like "*Manager*" = False Then intLength = InStr(1, shpObj.Text, Chr(10)) ' line feed If intLength <> 0 Then shpObj.Text = Mid(shpObj.Text, 1, intLength - 1) 'cuts off everything 1 character before line feed End If End If End If
shpObj.Cells("Char.Size[1]").Formula = "= 6 pt."
Next Next
End Function
à+
-- Bonjour,
Tu auras plus de chances d'obtenir une réponse adaptée en posant ta question sur le forum approprié, à savoir :