Calling Form in Word

erinbanister

New Member
Joined
Jun 19, 2013
Messages
1
Hi All,

I’ve created a form for a user to insert boilerplate text into the header of a word document. However, I can’t seem to figure out how to load the form when the user needs it – I tried making it open when the user opens a new document, but that’s not working. Ideally, I’d like to be able to place a link in the quick links toolbar to allow users access when they need it. How do I do this?

Thanks for any help you can provide. Code is below.

Code:
Option Explicit
Private Sub Document_New()
    Choose_ITAR_Header.Show
End Sub
Private Sub CommandButton1_Click()
    Unload Me
End Sub
Private Sub ITAR_Click()
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Select
    ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Delete
    Selection.TypeText Text:="ITAR Header "
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    Unload Me
End Sub
Private Sub NoITAR_Click()
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Select
    ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Range.Delete
    Selection.TypeText Text:="No ITAR Header "
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    Unload Me
End Sub
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,225,644
Messages
6,186,151
Members
453,339
Latest member
Stu61

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top