Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Writing to a new word document's bookmarks

Status
Not open for further replies.

Y2KCobra

IS-IT--Management
Mar 11, 2003
15
GB
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
 
Rick,

I just went to the site and it references a word document in a form. I want to create an external word document from a word form and access it. Do you know of any tips on that topic?

PS Thank you so much for your quick response. I am under a deadline =)

Steve
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top