Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() I'm trying to use Excel to automate the creation of a new Word file using a premade Word template. It makes the new Word file, but breaks on the last line where I try to insert my autotext. Please review and help me fix what I'm doing wrong. Also, if it matters, I also intend to mailmerge this Word doc to the active Excel file. The autotext definitely exists, so I must be calling it incorrectly. Thanks for helping! Dim objWord As Word.Application Set objWord = CreateObject("Word.Application") If Err Then Set objWord = New Word.Application End If objWord.Visible = True objWord.Activate objWord.Documents.Add Template:="c:\templates\template.dot", NewTemplate:=False, DocumentType:=0 objWord.ActiveDocument.AttachedTemplate.AutoTextEn tries("FORMS").Insert Whe=Selection.Range, RichText:=True -- leaftye |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Editing embedded Word file in Excel JUMPS to top | Excel Discussion (Misc queries) | |||
when i insert word art in excel sheet excel file closes automatica | Excel Discussion (Misc queries) | |||
problem with insert Excel file in another Excel file | New Users to Excel | |||
Insert & link a graphic file in Excel 2003 -- updatable pictures! | Excel Discussion (Misc queries) | |||
Can I insert a word document into a new excel file ? | Excel Discussion (Misc queries) |