Template with UserForm.

K

Klaus H

Sorry to crosspost. I don't known wich group is the right for my question
:)

I have an template (rekv.dot) containing an UserForm, to create a rekvisiton
form.

I would like to save the final document, on closing the document, in two
different destinations.
If the document is reopened, I don't want it to save unless it was altered.


ThisDocument contains:

Private Sub Document_New()
UserForm1.Show
End Sub

Private Sub Document_Close()
ThisDocument.SaveAs FileName:="g:\test\kopi\" & ActiveDocument.Name
End Sub

UserForm! contains:
Private Sub CommandButtonUdfyld_Click()
Selection.EndKey Unit:=wdLine
Selection.Font.Name = "Arial"
Selection.Font.Size = 11
Selection.LanguageID = wdDanish

(filling out form)

Selection.InsertDateTime DateTimeFormat:="dd.MM.yyyy", InsertAsField:=False
ActiveDocument.SaveAs FileName:="g:\test\new\" & frmRekv & ".doc"

Unload UserForm1
End Sub

What am i doing wrong?

Klaus H
 
D

Doug Robbins - Word MVP

What is happening, or not happening as the case maybe?

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

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

Similar Threads

Save document to a different folder 5
Open a userform when word opens and on New documents?? 9
Userform is blank 4
Closing UserForms 2
Userform in Excel is blank 1
DialogueBox 2
UserForm 0
Userform 4

Top