Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
other
informationbridge
office.intranets
office.misc
office.setup
office.xml
officeupdate
onenote
photodraw.discussion
powerpoint
producer
proj.standard&server
project
project.developer
project.pro_and_serve
project.server
project.vba
project2000
publisher
publisher.prepress
publisher.programming
publisher.webdesign
visio
visio.createshapes
visio.database.modeling
visio.dev.diagrams
visio.dev.shapesheet
visio.dev.vba
visio.dev.vc
visio.developer
visio.general
visio.installation
visio.printing
visio.software.modeling
visio.troubleshoot
  
 
date: Mon, 18 Aug 2008 08:21:01 -0700,    group: microsoft.public.visio.developer        back       


How would I attach a Data Graphic to a shape in Visio, Using VBA?   
I am attempting to use VBA to have Visio attach a data Graphic to some shapes 
I have on a page.  I had tried this code
Visio.ActiveWindow.Selection.DataGraphic = 
Visio.ActiveDocument.Masters("Data Graphic 2")

But, that does not work.
date: Mon, 18 Aug 2008 08:21:01 -0700   author:   James

RE: How would I attach a Data Graphic to a shape in Visio, Using VBA?   
Hi,

I am new to the DataGraphics, too.
Did you checked this document?
http://msdn.microsoft.com/en-us/library/aa342323.aspx
Did you have the DataGraphcs made by the user UI on your drawing?
-- 
JuneTheSecond  

Now, visual calculation is more visual.
http://www.geocities.jp/visualcalculation/english/index.html
date: Mon, 18 Aug 2008 18:08:09 -0700   author:   JuneTheSecond

Re: How would I attach a Data Graphic to a shape in Visio, Using VBA?   
I don't believe you can assign a Selection of objects to a
DataGraphic.  Rather you have to loop through the Selection and assign
the DG individually.  E.g,

Dim visShape as Shape

For Each visShape in ActiveWindow.Selection
  visShape.DataGraphic = ActiveDocument.Masters("Data Graphic 2")
Next

For Each looping is a good practice no matter what. Because almost
everything is a Shape in Visio.  So when you start Selecting stuff you
may net objects you don't want.  For Each allows you to insert a Shape
check to ensure you only operate on the ones you want.

SteveM


On Aug 18, 9:08 pm, JuneTheSecond
 wrote:
> Hi,
>
> I am new to the DataGraphics, too.
> Did you checked this document?http://msdn.microsoft.com/en-us/library/aa342323.aspx
> Did you have the DataGraphcs made by the user UI on your drawing?
> --
> JuneTheSecond  
>
> Now, visual calculation is more visual.http://www.geocities.jp/visualcalculation/english/index.html
date: Wed, 20 Aug 2008 08:10:29 -0700 (PDT)   author:   unknown

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us