Hi,
You know how to create bookmarks in the word template right?
So you create bookmarks in your wordtemplate call them so they mean something you remember..
Save both of your excel and your word template in the same folder that makes it a little bit easier to find and code.
Ok .. let get started .)
In the word document create a modul call it modPublic
Write code in there
public p_docDO as document
so the first Modul is finished.
then create a second module call it something like modDatei in there u create a prozedur
Code:
Sub UseThisDocument()
Set p_docDO = ThisDocument
End Sub
Create another Modul call it modBookmarks
Write following code
Code:
Property Get Textmarke(strName as string)as string
UseThisDocument
if p_docDO.Bookmarks.Exists(strName)then
Bookmarks=p_docDO.Bookmarks(strName).Range.Text
Else
Textmarke=""
End If
End Property
Code:
Property Let Textmarke(strName as string, strText as string)
dim rngTM as range
UseThisDocument
if p_docDO.Bookmarks.Exists(strName) then
set rngTM=p_docDO.Bookmarks(strName).range
rngTM.Text=strText
rngTM.Bookmarks.add strName
Else
msgbox "This bookmark is missing: " & strName, vbCritical
End if
End Property
So if you have this set up then you have access to the bookmarks you have set up in your word ducument!
If you created a bookmark with the name DO_Email for example you can test your code in the immidate window like so
Textmarke("DO_Email")="office@mynewoffice.co"
and press return you will find that the bookmark DO_Email is now set to
office@mynewoffice.co
So the first step is set up

Next step is to get the information from your excel Worksheet into those bookmarks .-)
But that is a different story and for me for today a bit to late but maybe someone else has a bit of time to get you further with this .-)
HTH
SW