How to I convert text case to "proper/title" case in shapesheet cell?

Started by chelmite, November 27, 2012, 07:06:28 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

chelmite

Can anyone help me?

I need to convert the contents of one shapesheet cell to "proper/title" case in another shapesheet cell, then include this new value as part of the text in a Visio 2010 drawing.


  • I did LOTS of searching, but found only LOWER and UPPER. I found other "office" functions for StrConv and a couple others, but they don't seem to work in a shapesheet cell. Am I missing something?
  • I tried to do the same thing using VB. I wrote a VB function that calls StrConv, but I can't figure out how to invoke my function. CALLTHIS seems to return 0 no matter what.

Public Function toProperCase(shape1 As shape, a As String) As String
    Dim b As String
    b = StrConv(a, vbProperCase)
    toProperCase = b
End Function

I put the following in the ShapeSheet cell:
=CALLTHIS("Module1.toProperCase","CXIArchitecture",ThePage!User.Arch)

Thanks,
Chelmite

Jumpy

Callthis Executes a function but doesn't return the result of the function! And it needs an event or sth. to be fired, so I guess you can't use that.

In older Visio Versions you can't place VBA-Function calls in ShapeSheet cells, like you could do with Excel. Don't know if that is possible in 2010.

Why don't you fire a function when the value of ThePage!User.Arch changes and then replace that change in proper case. Every other ShapeSheet cell only references that cell and should update automatically.

aledlund

Visio stopped allowing code in the shapesheet around 10 years ago.

"The CALLTHIS function always evaluates to 0, and the call to procedure occurs during idle time after the recalculation process finishes. Procedure can return a value, but Visio ignores it."

al

vojo

use the case cell

target shape case cell = guard(source shape case cell)

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 192 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1122KB.
Tokens: post-login.
Cache hits: 12: 0.00211s for 26,582 bytes (show)
Cache misses: 1: (show)
Queries used: 15.

[Show Queries]