Userform

D

discostu1975

I am working on a userform that will distribute the inputted information to
bookmarks in a word document. This part works flawlessly. Once the userform
has been filled out I am presented with Document1 that has all of the updated
information in about 5 sections.

I have a macro that I can run that will then take each of the sections and
save them as separate files to any specified location. This too works
flawlessly.

What I would like to have happen is once the user clicks my control button
it will do both of these processes so that it eliminates the need for them to
run the macro.

I snipped out a bunch of the bookmark moves, but have included the remainder
of the code. BreakOnSection is the name of the macro that I am currently
using. It is part of my normal.dot file.

Private Sub CommandButton1_Click()
With ActiveDocument
.Bookmarks("purchaser").Range _
.InsertBefore purchaser
.Bookmarks("purchaser2").Range _
~snip~
End With
Call BreakOnSection
UserForm1.Hide


End Sub
 
P

Paul Herber

I am working on a userform that will distribute the inputted information to
bookmarks in a word document.

This is a group for VBA in Visio, not Word. Try one of the Word
groups.

Please, whoever is in charge of the web interface to these groups, get
the UI changed! Once an Office application is chosen from the
navigation panel on the left only show the appropriate groups.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top