Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Exporting comments

This will copy it to a WORD application.

Sub CopyCommentsToWord()

Dim cmt As Comment
Dim WdApp As Object
Dim aWS As Worksheet

On Error Resume Next
Set WdApp = GetObject(, "Word.Application")
If Err.Number < 0 Then
Err.Clear
Set WdApp = CreateObject("Word.Application")
End If
Debug.Print "after err.number"

With WdApp
.Visible = True
.Documents.Add DocumentType:=0
For Each aWS In ActiveWorkbook.Worksheets
For Each cmt In aWS.Comments
.Selection.TypeText cmt.Parent.Address _
& vbTab & cmt.text
.Selection.TypeParagraph
Next
End With
Next aWS

Set WdApp = Nothing

End Sub

"Mark" wrote:

Can someone supply me with some code which examines a workbook, finds
comments in cells and then copies the contents of those comments into a
seperate workbook as the code runs through each worksheet in a workbook.

Mark

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
excel 2000 how to format the comments font all comments Delquestion Excel Discussion (Misc queries) 1 October 8th 09 02:19 PM
exporting comments into a separate spreadsheet? Joe Excel Discussion (Misc queries) 1 May 30th 08 08:22 PM
Exporting Comments TJAC Excel Discussion (Misc queries) 1 April 10th 06 08:49 PM
exporting comments? SirPoonga Excel Programming 3 November 18th 04 08:05 PM
Exporting Excel Comments in to Access tables Ian Millward Excel Programming 1 December 10th 03 12:29 PM


All times are GMT +1. The time now is 01:18 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"