使用VBA-构建一个代码,根据excel中输入或选择的信息,将自动填充单词中的句子。
例如......
在Excel中:
Question Answer
What is his Name? John
How many apples did he buy? 8
How much did the apples cost? 50
在Word中:
John bought 8 apples totalling $ 50 dollars.
根据答案栏(excel电子表格)中输入的信息,我希望word文档自动生成句子。
这可能吗?
谢谢, Metfan755
答案 0 :(得分:0)
(伪代码)的一些东西:
dim writing as string
writing=Sheets("x").Cells(y, z)
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Selection.InsertAfter (writing)
也许?
添加你需要写的句子的其他部分