Prev: Word "File in use" message box
Next: Importing/parsing data from an external file in Word 2007 Macr
From: JediKaiti on 22 Mar 2010 13:26 Hello! I am wondering if this is possible, and if so, how do I do it? What I want to do is this: I have a template, and I want to write a macro that will create a document based on this template by pulling data out of other files, formatting the data, and putting it in the appropriate section of the document. I have no experience with Word Macros or VBA, although I have programmed in VB.NET in the past. Any suggestions would be helpful! Thank you! Kaiti
From: Greg Maxey on 22 Mar 2010 13:40 You would need an AutoNew macro in the template that contained the code statements. Sub AutoNew() ActiveDocument.Bookmarks("DIP1").Range.InsertFile FileName:="C:\Test.doc" End Sub Where DIP1 is the first data insertion point and "C\Test.doc" is the file that you want inserted at that point. "JediKaiti" <JediKaiti(a)discussions.microsoft.com> wrote in message news:D860241C-5863-41E4-9DE6-EB4078929C54(a)microsoft.com... > Hello! I am wondering if this is possible, and if so, how do I do it? > > What I want to do is this: > > I have a template, and I want to write a macro that will create a document > based on this template by pulling data out of other files, formatting the > data, and putting it in the appropriate section of the document. > > I have no experience with Word Macros or VBA, although I have programmed > in > VB.NET in the past. > > Any suggestions would be helpful! > > Thank you! > > Kaiti
|
Pages: 1 Prev: Word "File in use" message box Next: Importing/parsing data from an external file in Word 2007 Macr |