Saltar al contenido principal

¿Cómo exportar comentarios de Excel a Word?

Para los usuarios de Excel, insertar comentarios en las celdas es una tarea común; a veces, es necesario copiar y pegar estos comentarios en un documento de Word para algún propósito. Por supuesto, puede copiar y pegar el comentario en Word uno por uno, pero este es un trabajo tedioso y que requiere mucho tiempo. ¿Hay alguna forma de exportar todos los comentarios de Excel a Word a la vez?

Exportar comentarios de la hoja de trabajo actual a Word con código VBA


flecha azul burbuja derechaExportar comentarios de la hoja de trabajo actual a Word con código VBA

Desafortunadamente, Excel no proporciona la función para copiar y pegar todos los comentarios en Word a la vez. Sin embargo, con el siguiente código VBA, puede exportar rápidamente todos los comentarios de la hoja de trabajo activa al documento de Word.

1. Mantenga pulsado el ALT + F11 teclas para abrir el Ventana de Microsoft Visual Basic para aplicaciones.

2. Hacer clic recuadro > Móduloy pegue el siguiente código en el Ventana de módulo.

Código VBA: exporta comentarios de la hoja de trabajo actual a Word

Sub CopyCommentsToWord()
'Update 20140325
Dim xComment As Comment
Dim wApp As Object
On Error Resume Next
Set wApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
  Err.Clear
  Set wApp = CreateObject("Word.Application")
End If
wApp.Visible = True
wApp.Documents.Add DocumentType:=0
For Each xComment In Application.ActiveSheet.Comments
    wApp.Selection.TypeText xComment.Parent.Address & vbTab & xComment.Text
    wApp.Selection.TypeParagraph
Next
Set wApp = Nothing
End Sub

3. Entonces presione F5 clave para ejecutar este código, y todos los comentarios en la hoja de trabajo activa se han exportado a un nuevo documento de Word con su dirección de celda. Ver captura de pantalla:

doc-exportar-comentarios1


Artículos relacionados:

¿Cómo insertar rápidamente un comentario en varias celdas en Excel?

¿Cómo cambiar la forma del cuadro de comentarios en Excel?

¿Cómo cambiar todos los formatos de comentarios en las celdas en Excel?

¿Cómo cambiar el nombre del autor de todos los comentarios en Excel?

Las mejores herramientas de productividad de oficina

🤖 Asistente de IA de Kutools: Revolucionar el análisis de datos basado en: Ejecución inteligente   |  Generar codigo  |  Crear fórmulas personalizadas  |  Analizar datos y generar gráficos  |  Invocar funciones de Kutools...
Características populares: Buscar, resaltar o identificar duplicados   |  Eliminar filas en blanco   |  Combine columnas o celdas sin perder datos   |   Ronda sin fórmula ...
Super búsqueda: Búsqueda virtual de criterios múltiples    Búsqueda V de valores múltiples  |   VLookup en varias hojas   |   Búsqueda difusa ....
Lista desplegable avanzada: Crear rápidamente una lista desplegable   |  Lista desplegable dependiente   |  Lista desplegable de selección múltiple ....
Administrador de columnas: Agregar un número específico de columnas  |  Mover columnas  |  Toggle Estado de visibilidad de columnas ocultas  |  Comparar rangos y columnas ...
Características destacadas: Enfoque de cuadrícula   |  Vista de diseño   |   Gran barra de fórmulas    Administrador de hojas y libros de trabajo   |  Biblioteca de Recursos (Texto automático)   |  Selector de fechas   |  Combinar hojas de trabajo   |  Cifrar/descifrar celdas    Enviar correos electrónicos por lista   |  Súper filtro   |   Filtro especial (filtro negrita/cursiva/tachado...) ...
Los 15 mejores conjuntos de herramientas12 Texto Herramientas (Añadir texto, Quitar caracteres, ...)   |   50+ Tabla Tipos (Diagrama de Gantt, ...)   |   40+ Práctico Fórmulas (Calcular la edad según el cumpleaños, ...)   |   19 Inserción Herramientas (Insertar código QR, Insertar imagen desde la ruta, ...)   |   12 Conversión Herramientas (Números a palabras, Conversión de Moneda, ...)   |   7 Fusionar y dividir Herramientas (Filas combinadas avanzadas, Células partidas, ...)   |   ... y más

Mejore sus habilidades de Excel con Kutools for Excel y experimente la eficiencia como nunca antes. Kutools for Excel ofrece más de 300 funciones avanzadas para aumentar la productividad y ahorrar tiempo.  Haga clic aquí para obtener la función que más necesita...

Descripción


Office Tab lleva la interfaz con pestañas a Office y hace que su trabajo sea mucho más fácil

  • Habilite la edición y lectura con pestañas en Word, Excel, PowerPoint, Publisher, Access, Visio y Project.
  • Abra y cree varios documentos en nuevas pestañas de la misma ventana, en lugar de en nuevas ventanas.
  • ¡Aumenta su productividad en un 50% y reduce cientos de clics del mouse todos los días!
Comments (17)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
This is excellent! however i am struggling to pin the comments to where it belong in the  worksheet. is there any way to be able to label the rows or column or cell in which the comments is extracted?
This comment was minimized by the moderator on the site
Able To Extract starts with the initial measurable data set and generates derived values ​.Users can insert and customize their numbers to professionally index business.
Philip
patchhere.com
This comment was minimized by the moderator on the site
Hey I figured out how to fix this. Line 13 needs to read "For Each xComment In Application.ActiveSheet.CommentsThreaded". (The output isn't exactly like the screenshot, you would have to add xComment.Author or perhaps some other properties in the For loop - but changing from Comments to CommentsThreaded gets this working again.)
This comment was minimized by the moderator on the site
I copied and pasted exactly but it only generated a blank word document. Any ideas?


Sub CopyCommentsToWord()
'Update 20140325
Dim xComment As Comment
Dim wApp As Object
On Error Resume Next
Set wApp = GetObject(, "Word.Application")
If Err.Number <> 0 Then
Err.Clear
Set wApp = CreateObject("Word.Application")
End If
wApp.Visible = True
wApp.Documents.Add DocumentType:=0
For Each xComment In Application.ActiveSheet.Comments
wApp.Selection.TypeText xComment.Parent.Address & vbTab & xComment.Text
wApp.Selection.TypeParagraph
Next
Set wApp = Nothing
End Sub
This comment was minimized by the moderator on the site
same issue. did you manage to solve?
This comment was minimized by the moderator on the site
Same...any thoughts?
This comment was minimized by the moderator on the site
This is super helpful! Thanks!
Is there a way to pull in the row or column header rather than the cell position (B4)?
This comment was minimized by the moderator on the site
I was able to get this result by changing the "xComment.Parent.Address" to "xComment.Parent.Value" in row 14.
This comment was minimized by the moderator on the site
omg! it was really helpful!
This comment was minimized by the moderator on the site
This is great and helps! Is there a way to get actual text within the cell to replace the cell number or to be included? I have headers and balloon instructions in the headers. I am trying to create a word procedure on filling out the rows with headers of the data (Ex.; "Name") and then the comment box tells the user the format.

Currently Shows with above macro:

A1 Username:


- Enter Name of Borrower as seen on Borrower organizational documents or other name supporting documents.


Looking for it so show the text of cell A1 which is Company Name.


Any help greatly appreciated!
This comment was minimized by the moderator on the site
Can it be done to extract from filtred rows after applying filter ? Thank you.
This comment was minimized by the moderator on the site
it really helped. tq!
This comment was minimized by the moderator on the site
does anyone know if I can do this but only copying comments from a specific row? any help will be much appreciated ive been trying to work on this for ages.
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations