text to Word template doc?

newguy

Well-known member
Joined
Jun 30, 2008
Messages
611
Location
Denver Co, USA
Programming Experience
1-3
The next thing I would like to do is build a .doc template and have the text be opened into that template, is it possible???
 
Last edited by a moderator:
Thanks JuggaloBrotha, any ideas on the other question (my last post)?
Nope, because it doesn't make any sense:

".doc template and have the text be opened into that template" If the text is in the template, how can you open it into the template? You can't, it's already there.
 
Let me try again, how/can I save the text to a blank document template?
I can save the text to a regular .doc format, what I want is the text to be placed in a blank document template (like the body of the doc) that has a customized Header and footer. is that poss?
 
I believe you can do this with interop. Syntax might not be correct but it should get you pointed in the right direction.

VB.NET:
		Dim wApp As New Word.Application
		Dim wDoc As Word.Document = wApp.Documents.Add("C:\PathtoTemplate\YourCustom.dot")

Edit: MSDN Article How to automate Word from Visual Basic .NET to create a new document
Go to the bottom section "Use a Template".
 
Last edited:
The next thing I...
New topic split to new thread. Please post new unrelated topics to new threads in appropriate forums.
 
Ok, I have looking through the interop stuff, I need to import microsoft.office.interop.word namespace correct.

Thanks MattP
 
Back
Top