gerhardub
asked on
Powershell and Excel Comments: Formating Question about Excel Comments
I've got two questions I need answered:
1) Is it possible to setup Excel some that comments inserted into a cell can be viewed using slider bars (bottom and right side sliders)?
2) How do you turn this on in either Office (2007 / 2010) or via PowerShell Code?
I've got an audit in Powershell that dumps installed applications into the comment field of a computer name.
But sometimes there is to much information to see in the comment field, and without sliders you have to EDIT the comment to VIEW the information.
Can anyone help me with this?
The powershell code looks likething like this:
#Add the comment to the call
$CurrentSheet.Cells.Item($ EventRow+1 ,$EventCol +3).Addcom ment($SrvA ppErrors.m essage)
# Set the size of the comment area to a readable size
$CurrentSheet.Cells.Item($ EventRow+1 ,$EventCol +3).Commen t.Shape.Wi dth = 50 * 15
$CurrentSheet.Cells.Item($ EventRow+1 ,$EventCol +3).Commen t.Shape.Hi eght = 30 * 15
GB
1) Is it possible to setup Excel some that comments inserted into a cell can be viewed using slider bars (bottom and right side sliders)?
2) How do you turn this on in either Office (2007 / 2010) or via PowerShell Code?
I've got an audit in Powershell that dumps installed applications into the comment field of a computer name.
But sometimes there is to much information to see in the comment field, and without sliders you have to EDIT the comment to VIEW the information.
Can anyone help me with this?
The powershell code looks likething like this:
#Add the comment to the call
$CurrentSheet.Cells.Item($
# Set the size of the comment area to a readable size
$CurrentSheet.Cells.Item($
$CurrentSheet.Cells.Item($
GB
You can't do that - what you can do is set the Autosize property of the Shape.Textframe to True so that it autofits the text?
ASKER
So what would that look like in code?
$CurrentSheet.Cells.Item($ EventRow+1 ,$EventCol +3).Commen t.Autosize = $True?
$CurrentSheet.Cells.Item($
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked like a champ!
(It'd still e mice if you could limit the window and have scroll bars... but it works great.)
(It'd still e mice if you could limit the window and have scroll bars... but it works great.)