sandam
02-15-2005, 07:06 AM
Hi again.
With the current project (a couple posts for it alreeady) I am working on, I am required to create a fax cover sheet (I have a template for it) after a letter has been typed (and an option of send by fax) is selected. So essentially I'm looking and creating a document from a template within a macro, populating it with data from the letter document and then closing it again so that the user can either continue on the doc or close as needs be.
I think it will be done using somthing like this - any advice ot tips would be appreciated.
Thanks in advance
Andrew;?:bug:
Sub CreateFaxSheet
Dim faxDoc as Word.Application
faxDoc = CreateOject (<template name and location>,Word.Template)
Call PopulateFaxSheet(LetterInformation)
Call MakeFaxDocVisibleToEdit
'and when they are done printing it
faxDoc.Quit SaveChange:=True 'I will save the fax sheet using a custom save procedure)
set faxDoc = Nothing
End Sub
With the current project (a couple posts for it alreeady) I am working on, I am required to create a fax cover sheet (I have a template for it) after a letter has been typed (and an option of send by fax) is selected. So essentially I'm looking and creating a document from a template within a macro, populating it with data from the letter document and then closing it again so that the user can either continue on the doc or close as needs be.
I think it will be done using somthing like this - any advice ot tips would be appreciated.
Thanks in advance
Andrew;?:bug:
Sub CreateFaxSheet
Dim faxDoc as Word.Application
faxDoc = CreateOject (<template name and location>,Word.Template)
Call PopulateFaxSheet(LetterInformation)
Call MakeFaxDocVisibleToEdit
'and when they are done printing it
faxDoc.Quit SaveChange:=True 'I will save the fax sheet using a custom save procedure)
set faxDoc = Nothing
End Sub