Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Créer une organigramme Visio à partir de Access

1 réponse
Avatar
Julie Morin
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

1 réponse

Avatar
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 :

news://msnews.microsoft.com/microsoft.public.fr.outlookexpress6

Ici, c'est le forum Outlook de la suite Office, alors ...

à+

--
Arnaud
-----------------------------------
http://users.skynet.be/mpfa/
-----------------------------------