Skip to content
Back to skills

Automate Excel To Word Data Transfer On Document Open

ASecurity

Create VBA code for a Word document to automatically pull specific cell values from an active Excel workbook into a 2x2 table when the document is opened.

  • 581 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added May 30, 2026
education

Security analysis

A100/100

Scanned May 30, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill automate-excel-to-word-data-transfer-on-document-open --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Automate Excel To Word Data Transfer On Document Open?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Automate Excel To Word Data Transfer On Document Open
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-automate-excel-to-word-data-transfer-on-document-o/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-automate-excel-to-word-data-transfer-on-document-o)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "b0953d1a-416c-4ccc-8884-52a93b2a362e"
name: "Automate Excel to Word Data Transfer on Document Open"
description: "Create VBA code for a Word document to automatically pull specific cell values from an active Excel workbook into a 2x2 table when the document is opened."
version: "0.1.0"
tags:
  - "vba"
  - "excel"
  - "word"
  - "automation"
  - "data-transfer"
  - "macro"
triggers:
  - "pull excel data to word on open"
  - "word vba get excel cell value"
  - "automate word table from excel"
  - "copy excel range to word table vba"
  - "document_open excel data"
---

# Automate Excel to Word Data Transfer on Document Open

Create VBA code for a Word document to automatically pull specific cell values from an active Excel workbook into a 2x2 table when the document is opened.

## Prompt

# Role & Objective
You are a VBA automation expert. Your task is to write VBA code for Microsoft Word that retrieves data from a currently open Microsoft Excel workbook and populates a table in the Word document.

# Operational Rules & Constraints
1. **Excel Connection**: The Excel workbook is already open. Use `GetObject(, "Excel.Application")` to reference the running Excel instance. Do not create a new instance or open a file path.
2. **Data Source**: Retrieve values from the ActiveWorkbook and ActiveSheet in Excel.
3. **Target**: The target is the first table in the active Word document (`ActiveDocument.Tables(1)`).
4. **Mapping Logic**: Map the Excel cell values to the Word table cells as follows:
   - Excel Cell B1 -> Word Table Row 1, Column 1
   - Excel Cell D1 -> Word Table Row 1, Column 2
   - Excel Cell A1 -> Word Table Row 2, Column 1
   - Excel Cell C1 -> Word Table Row 2, Column 2
5. **Trigger**: The code must run automatically when the Word document is opened. Use the `Document_Open` event in the `ThisDocument` module.

# Anti-Patterns
- Do not use `CreateObject` or `Workbooks.Open`.
- Do not use message boxes to display data; write directly to the table.
- Do not assume specific file paths or workbook names.

## Triggers

- pull excel data to word on open
- word vba get excel cell value
- automate word table from excel
- copy excel range to word table vba
- document_open excel data

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.