How to get Hyperion Smart View For Office Version add-in? - excel

Can you get the version of Hyperion SmartView installed using visual basic code for excel ?
I need to get a string output with the version number or something that looks like this -> 11.1.2.2.000
regards

The Smart View for Office Developer's Guide explains the use of HypGetVersion() on Page 44. It will, among other things, return the version.

Related

Should Word Online support inserting text into a content control via ContentControl.insertText?

I am developing a Word add-in with Office.js that utilizes ContentControl.insertText. According to the documentation, this method is provided by WordApi requirement set 1.1, which is supported in Office Online. Furthermore, the documentation for ContentControls lists Office Online as being supported and does not mention any exceptions when it comes to using that particular method.
That said, when I run the add-in in native Word 2016, everything works fine, but when I run it in the Word Online environment, it fails with the following exception:
code:"NotAllowed"
errorLocation:"ContentControl.insertText"
message:"The action isn’t supported in Word Online. Check the OfficeExtension.Error.debugInfo for more information."
For reference, I am using it like so:
control.insertText(heading.Text, 'Replace');
I also tried running the example provided in the documentation, with the same results: it works in Word 2016, but fails with the above exception in Word Online.
Has anyone been able to successfully insert text into a ContentControl in the Office Online environment? If not, are there plans for this functionality to be supported?
Any input or clarification would be most appreciated! Thanks!
I'm an engineer from MS. There are some cases which contentControl.insertText is not allowed.
I think the cause of your case is that there is more than one paragraphs in the heading.text and you try to insert heading.text into a inline content control.
The inline content control means that the content control just some part of a paragraph.
In order to make sure the root cause of your scenario, could you share me the doc and the script code.

User Defined Function by JavaScript API for Excel

I have a library of functions written in JavaScript, for example myfactorial(n) can caculate the factorial of n in my way.
I would hope to develop an add-in by JavaScript API for Excel, such that once a user loads the add-in, they could use the embedded functions, e.g., write in a formula: =myfactorial(A2) or =callfunction("myfactorial", A2). In short, it is about supporting User Defined Functions by JavaScript API for Excel, I guess they are asking the same thing here.
So, does any know how is the progress? Otherwise, is there some workaround that we could do?
Thanks for this question! User-defined functions are a central part of Excel customization today. We're working on a solution that will bring those capabilities across all our modern Excel platforms. We're still figuring out the design, so unfortunately I don't have a timeline or details to share right now. I'll give an update in a few months.
-Michael, PM for Office add-ins
Update 11/6/17: JavaScript custom functions in Excel are now available in Developer Preview for anyone to try: https://aka.ms/customfunctions

VBA End-user upgrading Microsoft Office 2007 to 2010 (VBA 6 to VBA7) problems and need for documentation, help, tips. (Enough with keywords)

As typical small-business user, when my laptop broke I HAD to upgrade to Office 2010 (2007 isn’t on market anymore). Now I have a bunch of quick-and-dirty VBA to go with my old worksheets. None of them were programming masterpieces, but those worked and got work done with excel, and office 2007.
Now I tried to use my old stuff on Office 2010, and everything is just little bit off to be usable. For two days I searched web, trying to find any documentation for the end user, no luck. I found a lot of blogs aimed to professional programmers who are hoping to make bullet proof code to serve anything from Office 0 to Office2010, 32 bits to 64 bits (No 8 bits here?), but none of the articles talked about the main business, The End User with whole lot of homemade coding to survive a day.
How do I make my old 2007 VBA to work with 2010?
No, I don’t need it to backwards compatible with anything, it is enough that it works with my new computer, and new software (In my case it is 64 bits, if anyone wonders). I just need to know why my code doesn’t work anymore, and what to do about it.
What I really want is some pointers to real information, if there is any!
Of course I could copy-paste every piece of my code to programmers discussion forums, get laughed at, and after some weeks I might get some of them to work, but what I really need is real information written to basic VBA user. I need to learn this.
So What Is Your Problem?
What has changed?
Calendar active-X component was missing. I found solution: http://answers.microsoft.com/en-us/office/forum/officeversion_other-customize/missing-calendar-control/03ad5d05-ca3f-4081-9989-e757223ebdde now I just have to redo every calendar on all my forms… Thanks.
Textbox.Text wasn’t working, I found and run Microsoft Excel Code Compatibility Inspector (CII), and it showed that I have few thousand of those Textbox.Text elements that are “Deprecated” – “Potentially contains removed items the object model” – What?
It keeps getting better, same Microsoft software stated:
“TYPE: DEPRECATION
ITEM: [xls]SmartTagRecognizer.FullName
URL: http://go.microsoft.com/?linkid=9719761
CODE: MyFullName = ThisWorkbook.FullName””
No explanation… (Btw. only way to stop the Inspector and see the results was CRT-ALT-DEL –Stop…)
I visited the links given by the Inspector, no help there.
I run the Inspector few times, and It gave different results every time. Now that is interesting.
I hear your problem, now show me your problem
Where do I start. Here is one.
I have a form where user can make a new ‘appointment’, when saving, VBA creates piece of code and new Shape into calendar worksheet (and to Outlook, but that is not the point here). When user comes back and clicks that shape – button – Button runs a piece of code that was created. here is the code:
Private Sub myMacro2001_Click()
Dim meetingId As Integer
meetingId = 2001
Load formHours
Call formHours.selectMeeting(meetingId)
formHours.Show vbModeless
End Sub
Which is supposed, and did back in 2007, open up form formHours with information stored for that meeting 2001 (meetingId)
And the code in formHours starts as:
Sub selectMeeting (ByRef IdNo As Integer) ’Bring in the meeting ID
Meeting = IdNo
….
Not very elegant, but it worked. Doesn’t do that anymore.
If you can help me with this case, I appreciate, But it would be even better if you inform me where was I supposed to find the answer.
What has changed? Worked before, doesn’t anymore. What to do?
(PS. I know my code is crappy, but it worked… And I just would like to find out what has changed, and how do I need to change.
Ps.Ps Yes I know I should be asking Microsoft, but you know how that is…)
FOLLOWUP
After some kind advice from Barrowc and others I managed to fix some of problems. Changing Text.Text to Text.Value created bunch of new problems, some of Text-Values were used on formulas, and now I needed to change them Val(FooTextBox.Value)
What is really surprising is that 2010 seems very SLOW! I ran 2007 and 2010 side by side at office, and 2007 won hands down. One of my workers had already invoiced a customer using 2007, when 2010 was still opening up! Funny, since 2007 was running on AMD Athlon X2 Dual-Core with limited memory, and 2010 was on my new laptop with Core i7-740QM, 6 GB, both on win7-64. I surfed the net and didn't find any complaints that VBA7 on Office 2010 is so much slower than VBA6 on Office2007. I don't know if this is just my problem, but my employees voted for 2007 single minded...
For all of your TextBox instances change .Text to .Value
The SmartTagRecognizer issue would appear to be a false positive so no action needed there
On the error with the form, you could try creating the form this way to see if it helps:
Private Sub myMacro2001_Click()
Dim meetingId As Integer
Dim fmHours As formHours
meetingId = 2001
Set fmHours = New formHours
fmhours.selectMeeting meetingId
fmHours.Show vbModeless
End Sub
Also, you could change Sub selectMeeting to Public Sub selectMeeting
Documentation on the actual differences in VBA between Office 2007 and Office 2010 seems to be a bit sparse. This page specifically mentions that 32-bit ActiveX controls (both custom and built-in) will not work in the 64-bit version of Office 2010. Therefore, this may well be the root of your problem.
There is also a quote from Microsoft here:
Will a 64-bit version of the Office 2010 product be available?
Yes, 64-bit Office 2010 product
upgrades will be available. However
we strongly recommend most users
install 32-bit version of Office 2010
on both 32 and 64-bit Operating
Systems because currently many common
add-ins for Office will not function
in the 64-bit edition. The 64-bit
installation of Microsoft Office 2010
products will be available for users
who commonly use very large documents
or data set and need Excel 2010
programs to access greater than 2GB of
memory. There may be technical issues
with the 64-bit version and in order
to install a 64-bit version of Office
2010 product users must have a 64-bit
supported operating system on their
PC.
(my emphasis)
If you can, try installing to the 32-bit version of Office 2010 instead
I am having issues too... for decades I've used this to create a string of "=" characters for a visual break in text etc...
STRING$(80,"=")
Now people are telling me that the code fails in Excel 2010.
What's the replacement for the above? I mean... I could do this...
For X = 1 to 80
print "=";
next x
print
but that's a real step backwards.
There is one potential fix... that is to change it to reference VBA like this...
VBA.STRING$(80,"=")
It appeared to still work on 2007.
Picking up on this point from #barrowc:
This page specifically mentions that 32-bit ActiveX controls (both
custom and built-in) will not work in the 64-bit version of Office
2010.
I have a partial solution to that - replacing ActiveX buttons with shapes embedding images - and some of the answers you need for that may be in an answer I gave about faking 'button click' behaviour
This is a lot of work, and you're regressing from event-driven code to less-capable objects and an outdated 'assign macro' design. But you can at least maintain the visual usability of your worksheet design.

DoDataExchange VC++ 6.0

I inherited an very old application that I am in the process of updating it (I know, we should have rewrote it in VS 2008, but we purchased a company, which is how I was stuck with the relic). Using UpdateData(TRUE) to retrieve the changes made in the dialog controls, nothing is being updated. I have an edit control, with an integer variable, and an edit control with a string variable, assigned using the class wizard. Upon pressing the OK button, the UpdateData(TRUE) is executed to retrieve the new values from the disalog.
I seem to remember having a similar problem back when VS C++ 6.0 first came out, but have not used it since VS 2003 and C# became prevalent.
Thanks for any help in advance!
Bill
Check the DoDataExchange() method. It should have the logic for writing data to or reading it from the controls. If the programmers used the default implementastion, then there will be a DDX_... macro for each control that is being read/written. Just look at any other MFC dialogs (in your code or google) to see how the DDX commands should be written if they are missing.
Alternatively, if it's only 1 or 2 values you can easily just get the control and read it directly if you don't mind doing validation etc yourself. Get the ID of the control from the form designer and use something along the lines of:
CEditWnd *pWnd = GetDlgItem(ID_THECONTROL);
CString newValue = pWnd->GetWindowText();
...
You'll need to look at the content of the DoDataExchange method and see what it is doing. There is not sufficient information here to tell what could be going wrong other than that.

Howto get SharePoint version using object model

With WSSv2 (SharePoint 2003) you could get the version of SharePoint you were working with
e.g. SPGloablAdmin.Version gives you "12.0.0.6219" for WSSv3 SP1
However its now obsolete (although still works).
Does anyone know the WSSv3 (SharePoint 2007) equivalent?
You have things like SPWebService.ContentService.Version but that version number is just a timestamp and doesn't seem to relate back to build versions.
SPFarm.Local.BuildVersion would probably give you the same result without having to refer to a SPWebService.
Cheers :)
SPWebService.ContentService.Farm.BuildVersion
http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spfarm.buildversion.aspx
As maxim said, but i included it in a Powershell script http://snipt.org/nLS/

Resources