View Full Version : Solved: Word Template removing "Salutation" & "Subject line" pop up boxes
jcb21
01-12-2013, 02:06 AM
Hi there
I'm an extreme newbie and have made my first template including a pop up bos for entering information and my code is all working fine but for some reason when I open my word template before it pops up with my window I've coded it first pops up with "salutation" and "subject line".
I'm sure there's a really obvious solution I'm missing, an option I haven't unticked or something but I've spent the last couple of hours trying to figure it out and I'm at a loss.
Thanks in advance for your time!
Cheers
Janelle
gmaxey
01-12-2013, 06:57 AM
Without seeing your code it will be hard to tell for sure.
jcb21
01-12-2013, 02:58 PM
Hi Greg
It only seems to be when I open the file in template form which I guess can be avoided. But I have the following code.
In thisDocument
Private Sub Document_New()
frmlwopTestform1.Show
End Sub
Private Sub Document_Open()
frmlwopTestform1.Show
End Sub
and my userform
Private Sub UserForm_Initialize()
With cbolocation
.AddItem "abc"
.AddItem "xyz"
.AddItem "efg"
.AddItem "hij"
End With
End Sub
Private Sub cmdCancel_Click()
Unload Me
ActiveDocument.Close SaveChanges:=False
End Sub
Private Sub cmdOK_Click()
With ActiveDocument
.Bookmarks("FirstName").Range.Text = txtFirstName.Value
.Bookmarks("FirstName1").Range.Text = txtFirstName.Value
.Bookmarks("LastName").Range.Text = txtLastName.Value
.Bookmarks("Position").Range.Text = txtPosition.Value
.Bookmarks("Wd").Range.Text = txtWd.Value
.Bookmarks("Wd1").Range.Text = txtWd.Value
.Bookmarks("Location").Range.Text = cbolocation.Value
.Bookmarks("DateFrom").Range.Text = txtlwopfrom.Value
.Bookmarks("DateTo").Range.Text = txtlwopto.Value
.Bookmarks("Mgr").Range.Text = txtmanager.Value
.Bookmarks("MgrsPosition").Range.Text = txtmanposition.Value
End With
Application.ScreenUpdating = True
Unload Me
End Sub
Hope I used the correct tags for my code.
Thanks again
Janelle
fumei
01-12-2013, 05:44 PM
Can you post your template, stripped on any personal information? There is nothing in your code to indicate the situation you describe.
jcb21
01-13-2013, 11:55 PM
After testing it at work today it seems to work on other PC's so I think its just my pc being ...odd. Thanks for trying to help. I
Cheers
Janelle
fumei
01-14-2013, 03:58 PM
Possibly. However, there is likely some reason for that oddness.
Powered by vBulletin® Version 4.2.5 Copyright © 2025 vBulletin Solutions Inc. All rights reserved.