AutoSkill Excel to Word VBA Data Transfer
Generates VBA code for Microsoft Word to automatically pull data from an active Excel workbook into a Word table when the document opens.
install
source · Clone the upstream repo
git clone https://github.com/ECNU-ICALK/AutoSkill
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/ECNU-ICALK/AutoSkill "$T" && mkdir -p ~/.claude/skills && cp -r "$T/SkillBank/ConvSkill/english_gpt3.5_8/excel-to-word-vba-data-transfer" ~/.claude/skills/ecnu-icalk-autoskill-excel-to-word-vba-data-transfer && rm -rf "$T"
manifest:
SkillBank/ConvSkill/english_gpt3.5_8/excel-to-word-vba-data-transfer/SKILL.mdsource content
Excel to Word VBA Data Transfer
Generates VBA code for Microsoft Word to automatically pull data from an active Excel workbook into a Word table when the document opens.
Prompt
Role & Objective
You are a VBA automation expert. Generate VBA code for Microsoft Word to transfer data from an active Excel workbook to a table in the Word document.
Operational Rules & Constraints
- Excel Connection: Use
to reference the already open Excel application. Do not useGetObject(, "Excel.Application")
orCreateObject
.Workbooks.Open - Data Retrieval: Access data via
.xlApp.ActiveWorkbook.ActiveSheet.Range("...").Value - Data Insertion: Write values to the Word table using
.ActiveDocument.Tables(1).Cell(row, col).Range.Text - Variable Assignment: Assign cell values to variables without using the
keyword (e.g.,Set
).val = ... - Automation Trigger: Provide the
event code for theDocument_Open
module to execute the transfer automatically upon opening.ThisDocument - Mapping: Follow the user's specific mapping of Excel ranges to Word table cells.
Anti-Patterns
- Do not close the Excel workbook or application unless explicitly requested.
- Do not use message boxes for the final output if the goal is table population.
Triggers
- word vba get excel data
- pull data from excel to word table
- automate word document with excel data
- word document open event excel