Visio Guy

Visio Discussions => Programming & Code => Topic started by: healthNut on August 13, 2012, 06:09:05 AM

Title: How to access and set the Foreign Image Transparency Cell?
Post by: healthNut on August 13, 2012, 06:09:05 AM
Tried this but the the transparency does not set:


Sub setTransparency(shpObj As Visio.Shape, intVal As Integer)
  Dim cellObj As Visio.Cell
  Set cellObj = shpObj.CellsU("Transparency")

  Debug.Print "cellObj.Name: " & cellObj.Name

  Debug.Print "Before cellObj.Formula: " & cellObj.Formula
  cellObj.Formula = intVal
  Debug.Print "After cellObj.Formula: " & cellObj.Formula

End Sub


Immediate window output:
cellObj.Name: Transparency
cellObj.Section: 1
Before cellObj.Formula: 0%
After cellObj.Formula: 0%
Title: Re: How to access and set the Foreign Image Transparency Cell?
Post by: healthNut on August 14, 2012, 03:46:19 AM
Figured it out:
Transparency formula was looking for a string, not an integer
Browser ID: smf (is_webkit)
Templates: 1: Printpage (default).
Sub templates: 4: init, print_above, main, print_below.
Language files: 1: index+Modifications.english (default).
Style sheets: 0: .
Hooks called: 44 (show)
Files included: 25 - 925KB. (show)
Memory used: 771KB.
Tokens: post-login.
Cache hits: 7: 0.00094s for 22,301 bytes (show)
Cache misses: 1: (show)
Queries used: 9.

[Show Queries]