B
brucedodds
I'm working on a project to convert corporate Office documents from
Office 2003 to 2007. My question has to do with object properties
that were exposed in Office 2003 and are now hidden.
To use a Word example, see this code:
START OF CODE
If System.Country = 1 Or System.Country = 2 Then
ActiveDocument.PageSetup.PaperSize = wdPaperLetter
Else
ActiveDocument.PageSetup.PaperSize = wdPaperA4
End If
END OF CODE
"System.Country" is now a hidden property, but when run in Word 2007
this code produces the same result it did in Word 2003. In the
Immediate window, when this line is entered:
?System.Country
a value is displayed in the window.
An Excel example using the hidden OutlineFont property:
START OF CODE
With ActiveCell.Characters(Start:=1, Length:=8).Font
. . .
.OutlineFont = False
. . .
End With
END OF CODE
This code executes without throwing an error. However, in the
Immediate window, when this line is entered:
?ActiveCell.Outlinefont
VBA displays the message "Run-time error '438'. Object doesn't
support this property or method."
It appears that some properties such as System.Country, are hidden
because they're deprecated. Other properties, such as
ActiveCell.OutlineFont, are hidden because they no longer exist.
The challenge is that the tool we're using to scan Office files for
conversion problems flags all references to properties that were
exposed in 2003 and hidden in 2007 as errors, whether or not they
affect how the application runs. There are scores of these
properties. If anyone knows of a reference that classifies hidden
Office 2007 properties based on how they affect the application,
please let me know.
Thanks.
Office 2003 to 2007. My question has to do with object properties
that were exposed in Office 2003 and are now hidden.
To use a Word example, see this code:
START OF CODE
If System.Country = 1 Or System.Country = 2 Then
ActiveDocument.PageSetup.PaperSize = wdPaperLetter
Else
ActiveDocument.PageSetup.PaperSize = wdPaperA4
End If
END OF CODE
"System.Country" is now a hidden property, but when run in Word 2007
this code produces the same result it did in Word 2003. In the
Immediate window, when this line is entered:
?System.Country
a value is displayed in the window.
An Excel example using the hidden OutlineFont property:
START OF CODE
With ActiveCell.Characters(Start:=1, Length:=8).Font
. . .
.OutlineFont = False
. . .
End With
END OF CODE
This code executes without throwing an error. However, in the
Immediate window, when this line is entered:
?ActiveCell.Outlinefont
VBA displays the message "Run-time error '438'. Object doesn't
support this property or method."
It appears that some properties such as System.Country, are hidden
because they're deprecated. Other properties, such as
ActiveCell.OutlineFont, are hidden because they no longer exist.
The challenge is that the tool we're using to scan Office files for
conversion problems flags all references to properties that were
exposed in 2003 and hidden in 2007 as errors, whether or not they
affect how the application runs. There are scores of these
properties. If anyone knows of a reference that classifies hidden
Office 2007 properties based on how they affect the application,
please let me know.
Thanks.