Print comments "as displayed on sheet" macro

Xx7

Board Regular
Joined
Jan 29, 2011
Messages
126
Would like to create a macro that selects print comments "as displayed on sheet" for the entire workbook. I don't actually want the macro to print... but I want to toggle the comments to "as displayed on sheet", so that when I do print, they will be displayed. Thx! :)
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Try this:

Sub Macro1()

Application.DisplayCommentIndicator = xlCommentAndIndicator
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.PrintComments = xlPrintInPlace
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
Application.DisplayCommentIndicator = xlCommentIndicatorOnly
End Sub
 
Upvote 0
Hmmm... no luck with Excel 2010. When I run it it hides all my comments on my worksheet, so I can't see them :(. Then when I go to print, they don't show up either.

I should have been more clear... I have a worksheet with a bunch of comments that are already being shown (eg. I can read them on the worksheets without scrolling over them). I want to run a macro that doesn't do anything visibly to the workbook... but will print the comments as displayed on sheet.
 
Upvote 0
OK, if your comments are already showing then adjust the macro to:

Sub Macro1()
ActiveSheet.PageSetup.PrintArea = ""
With ActiveSheet.PageSetup
.PrintComments = xlPrintInPlace
End With
ActiveWindow.SelectedSheets.PrintOut Copies:=1
End Sub

However, I am using Excel 2007, so I don't know how this will work for you.
 
Upvote 0
It works to print the comments... however, periferated lines show up on the worksheet indicating the print area. Is there anyway to get rid of these? Maybe format the page setup to "Fit to one sheet" in the macro? thx! :)
 
Upvote 0

Forum statistics

Threads
1,224,594
Messages
6,179,795
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top