Returns CFBundleVersion of Microsoft Word as a String.
Use this function do determine whether the required version of Word is installed.
When Word is not found on the current computer, then an empty String is returned.
If an error occurred, then "ERROR" is returned.
Example for a returned String:
14.4.7
Returns:
Type |
Value |
Description |
String |
empty String |
Microsoft Word was not found on the computer |
String |
ERROR |
In case of any error the string "ERROR" is returned |
String |
14.4.7 |
When Word was found, then the CFBUNDLEVERSION is returned as a String, for example: "14.4.7" |
Available in:
WindowMain |
WindowLink |
YES |
YES |
Used in:
XojoScript Name |
GUID |
Create letter in Word, from address |
90AC7CD7-EE78-4659-8076-076E96B9EF5B |
Print 24 labels on A4 from addresslist |
51EEF5D2-24F3-413E-B82A-A3FC791EB73F |
Print 24 labels of 1 address |
ADF92843-E182-4410-B77D-70A7F4206B01 |
Print Addresslist in Word |
A0503557-7DB7-4CC0-B08B-31005A0B1879 |
Create Seminar Invoice in Word |
D2036EFA-D283-481A-9A93-D00547680749 |
Hint: You can find references to XojoScripts which make use of this function by sending the following SQL statement to the database:
Select id,GUID, ScriptName,ScriptCode from im_scripts where ScriptCode Like '%WordGetVersion%'
Example XojoScript:
// Check if we have Word Installed
Dim v As String = WordGetVersion
If v = "" Or v = "ERROR" Then
MsgBox "Microsoft Word is not installed!"
Return
End If
Dim ver As Integer = Val(Left(v,Instr(v,".")-1))
If ver < 14 Then
MsgBox "Microsoft Word 2011 or newer is required!"
Return
End If
MsgBox "CFBundleVersion : " + v + EOL + "Major version : " + Str(ver)