Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
for a documentation of an application I do need all the Help texts of every object.
Until now, I used the document analyzer of Rob Wunderlich ( http://robwunderlich.com/downloads/ ) and it worked fine.
What I now need is add the help texts to the objects.
Anyone now where I can find it?
Thanks!
You can do it with a macro. Here's an example that simply the ObjectID and its help text:
sub GetHelpText
msg = ""
Objects = ActiveDocument.ActiveSheet.GetSheetObjects
For i = lBound(Objects) To uBound(Objects)
OT = Objects(i).GetObjectType
OID = Objects(i).GetObjectID
set prop = Objects(i).GetProperties
Select Case OT
Case 1,2,3,4,6,7,8,9,18,34,35
msg = msg & OID & " " & prop.Layout.Frame.HelpText.v & chr(10)
Case 10,11,12,13,14,15,16,20,21,22,23,27,28
msg = msg & OID & " " & prop.GraphLayout.Frame.HelpText.v & chr(10)
Case 5,19
msg = msg & OID & " " & prop.Frame.HelpText.v & chr(10)
Case else
End Select
next
msgbox msg
end sub
Note! I haven't checked every chart type (object types 10,11,12,13,14,15,16,20,21,22,23,27,28), but I expect they all use the same interface and that the above works for all chart types.
HI
Are you mentioning this?
Hi,
exactly!
Hi
If you achieve requirement, pls close this post by mark as assumed answer or correct answer..
Well, I know where to find the help texts in the objects. What I really wanted was an analysis of all help texts in all objects of the document.
A table like SheetName - ObjectName - HelpText.
With the Document Analyzer of Rob Wunderlich I can get the first two columns but I need to know how to load the helptexts ...
You can do it with a macro. Here's an example that simply the ObjectID and its help text:
sub GetHelpText
msg = ""
Objects = ActiveDocument.ActiveSheet.GetSheetObjects
For i = lBound(Objects) To uBound(Objects)
OT = Objects(i).GetObjectType
OID = Objects(i).GetObjectID
set prop = Objects(i).GetProperties
Select Case OT
Case 1,2,3,4,6,7,8,9,18,34,35
msg = msg & OID & " " & prop.Layout.Frame.HelpText.v & chr(10)
Case 10,11,12,13,14,15,16,20,21,22,23,27,28
msg = msg & OID & " " & prop.GraphLayout.Frame.HelpText.v & chr(10)
Case 5,19
msg = msg & OID & " " & prop.Frame.HelpText.v & chr(10)
Case else
End Select
next
msgbox msg
end sub
Note! I haven't checked every chart type (object types 10,11,12,13,14,15,16,20,21,22,23,27,28), but I expect they all use the same interface and that the above works for all chart types.
Hi Richters,
I understand that you are going to use the Help Text for documentation and are you using this for expressions/calculations? If yes, I prefer different approach to maintain the Help Text. I understand that I'm not providing a solution for your question but just giving something to think about...
Let v_Exp_TotalSales = Sum(Sales) //Using Sales filed to calculate total sales...blah blah blah
This means you can have your Help Text in one place and if you are developing multiple applications with same calculations then you can store this QVW calculation file and call it whenever you need. It's easy to maintain and update only one place. And finally you can easily export the script and variables to get the calculations and Help Text. Just trying to mimic Object Oriented Programmings!!
I hope this helps!
Cheers,
DV
Nice trick, but you will need to put your expression in quotes for this to work.
Let v_Exp_TotalSales = 'Sum(Sales) //Using Sales filed to calculate total sales...blah blah blah';
For completeness, SubField(v_Exp_TotalSales,'//',2) will return the comment part of the variable.
Thanks Gysbert. Totally agreed, you need the single quotes and most of the time ASCII functions. That was just a Tipping Point and you can take it from there on.
BTW - I like your contributions on the community. Good job
Good luck!
Cheers,
DV
Hi,
this macro is what i searched. I worked on the Document Analyzer the same time and found out that it creates XML-files with all properties of all objects a temporary folder. I just included these files in the analyzer like:
for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')
Object_Properties:
LOAD DISTINCT
text(left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4)) as Objectname
FROM $(File);
next File;
for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')
join (Object_Properties) LOAD
text(left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4)) as Objectname,
[Layout/Frame/HelpText/v] as Helptext
FROM $(File) (XmlSimple, Table is [QVObjects/TableBoxProperties]);
next File;
for each File in filelist ('C:\Users\***\AppData\Local\Temp\qvwork\****\Document\*')
join (Object_Properties) LOAD
left(right('$(File)',len('$(File)')-index('$(File)','\',-1)),len(right('$(File)',len('$(File)')-index('$(File)','\',-1)))-4) as Objectname,
[GraphLayout/Frame/HelpText/v] as Helptext
FROM $(File) (XmlSimple, Table is [QVObjects/GraphProperties]);
next File;
left join (Object_Properties)
LOAD
Objectname,
Objectname as ObjectId
Resident Object_Properties;
in the Clean-up register in Script. Then you can create a table which shows the helptext for every object easily.
Thanks for your help everyone.