Hi ,my script is runnig well and it export to word.
Create a new document based on the template .But problem is …i had save that templete document in drive “C” with name “quote.dot”. but the problem is that when the user is new or if he has not stored this templete docujment in his machine then it won’t work.
Did you get my point…
For this i have to make sure when the database is open first time in any machine then it will save that templete document in his c drive and then this will work fine.
I dont know how to do this ?Do you have any script for the same.This is my code…
CustName=uidoc.FieldGetText(“CustName”)
Contact=uidoc.FieldGetText ("Contact")
username=uidoc.FieldGetText("username")
usermailid=uidoc.FieldGetText ("usermailid")
'Create the Word object:
Set word = CreateObject("Word.Application") 'Create Word object
Call word.documents.add("quote.dot") 'Create a new document based on the template "quote.Dot"
Set worddoc = word.activedocument 'Get a handle for the active document
'Assign the field values:
'
worddoc.FormFields(1).result = CustName
worddoc.FormFields(2).result = Contact
worddoc.FormFields(3).result = username
worddoc.FormFields(4).result = usermailid
worddoc.FormFields(5).result = Contact
Pls help.
Thanks