A
Angyl
In the process of my job I often find myself duplicating information. I have
learned enough from these boards in the last month to know that it is
probably possible to save myself the trouble of a few steps.
What I have before me is a form with a LOT of fields in it that are
bookmarked.
I also have saved on my system a form with a LOT of fields in it that share
many of the same bookmark names.
I want to make one of these forms, automatically creaate a NEW document
based on a template of the OTHER document and then populate the boomarked
fields in that new document with its existing data.
Make sense?
I've already managed to (learned how) to make two documents "talk" to each
other, so I suppose all I'm looking for is the code to tie this all together
at once, perhaps putting a macro in the last field of the document that will
run on exit
This will open the document from a template:
Sub OpenPayrollReport()
'
' Macro2 Macro
' Macro recorded 5/5/2006 by Timothy Allen
'
Documents.Add Template:= _
"C:\Documents and Settings\tallen\Application
Data\Microsoft\Templates\Policy Payroll Report.dot" _
, NewTemplate:=False, DocumentType:=0
End Sub
I need to expand that macro to tell the new document to point all of its
bookmarked fields to the current document I have open, and (optionally) go
one step further and SAVE that new document based on the text entered in one
of the fields!!
WEEEEE Give me lots more time in my life to be further exploited by my boss!!
learned enough from these boards in the last month to know that it is
probably possible to save myself the trouble of a few steps.
What I have before me is a form with a LOT of fields in it that are
bookmarked.
I also have saved on my system a form with a LOT of fields in it that share
many of the same bookmark names.
I want to make one of these forms, automatically creaate a NEW document
based on a template of the OTHER document and then populate the boomarked
fields in that new document with its existing data.
Make sense?
I've already managed to (learned how) to make two documents "talk" to each
other, so I suppose all I'm looking for is the code to tie this all together
at once, perhaps putting a macro in the last field of the document that will
run on exit
This will open the document from a template:
Sub OpenPayrollReport()
'
' Macro2 Macro
' Macro recorded 5/5/2006 by Timothy Allen
'
Documents.Add Template:= _
"C:\Documents and Settings\tallen\Application
Data\Microsoft\Templates\Policy Payroll Report.dot" _
, NewTemplate:=False, DocumentType:=0
End Sub
I need to expand that macro to tell the new document to point all of its
bookmarked fields to the current document I have open, and (optionally) go
one step further and SAVE that new document based on the text entered in one
of the fields!!
WEEEEE Give me lots more time in my life to be further exploited by my boss!!