Hey everyone,
I have tried everything that I can think of but have failed. What I wish to do is create a new word document, based on a template, from a form and write to it. Everytime I try it writes to document that invoked the form.....Arggg
Does anyone know how I can accomplish what Im trying to do.
Any help is greatly appreciated,
Steve
Code Used for test
Sub testit()
Dim DocumentCount As Integer
WhichDocumentToWriteTo = 0
Documents.Add Template:="C:\Program Files\Microsoft Office\Templates\test.dot"
WhichDocumentToWriteTo = Documents.Count 'Tells me which Document# it is
StatusForm.Hide 'Current Form that is active
Documents(WhichDocumentToWriteTo).Activate
UpdateBookmarks "analyst_name", "Steve Test"
Documents(1).Activate
StatusForm.Show
End Sub
I have tried everything that I can think of but have failed. What I wish to do is create a new word document, based on a template, from a form and write to it. Everytime I try it writes to document that invoked the form.....Arggg
Does anyone know how I can accomplish what Im trying to do.
Any help is greatly appreciated,
Steve
Code Used for test
Sub testit()
Dim DocumentCount As Integer
WhichDocumentToWriteTo = 0
Documents.Add Template:="C:\Program Files\Microsoft Office\Templates\test.dot"
WhichDocumentToWriteTo = Documents.Count 'Tells me which Document# it is
StatusForm.Hide 'Current Form that is active
Documents(WhichDocumentToWriteTo).Activate
UpdateBookmarks "analyst_name", "Steve Test"
Documents(1).Activate
StatusForm.Show
End Sub