G
gravesen
HI all I have a little problem and would like to hear if anyone of yo
can help me.
I have a documents opening a forn as the first thing. I would to fil
this for with data and when I then press the ok button I would like t
open a small menu.exe program.
Dim RetVal
RetVal = Shell("C:\WINDOWS\System32\CALC.EXE", 1)
I can open this using the following code but my problem is that thi
only works if I have the complete path. I wan't to run the hole thin
from a cd-rom and therefore I don't know the exact path. I have thi
other I am using to open another dot file through the first dot file.
am using this code for this:
Dim letterofenquiry As Object
Set letterofenquiry = CreateObject("word.application")
letterofenquiry.Documents.Add ThisDocument.Path & "\"
"letter_enquiry.dot"
letterofenquiry.Visible = True
Can I use a little of the codes to get what I want or do you know
way??
BTW this is the code I am using for the form.
Any Help is so grat
Private Sub cmdOK_Click()
Dim strSenderAddress As String
If cbovalgatt.Value = "Dear Sir," Then
TXTATT = "Yours faithfully,"
End If
If cbovalgatt.Value = "Dear Madam," Then
TXTATT = "Yours faithfully,"
End If
If cbovalgatt.Value = "Dear Mr Jones," Then
TXTATT = "Yours sincerely,"
End If
If cbovalgatt.Value = "Dear Sirs," Then
TXTATT = "Yours faithfully,"
End If
If cbovalgatt.Value = "Mesdames," Then
TXTATT = "Your faithfully,"
End If
If cboatt1.Value = "Direktør" Then
TXTATT1 = "For the attention of the Managing Director"
End If
If cboatt1.Value = "Indkøbschef" Then
TXTATT1 = "For the attention of the Purchasing Manager"
End If
If cboatt1.Value = "Filialchef" Then
TXTATT1 = "For the attention of the Branch Manager"
End If
If cboatt1.Value = "Salgchef" Then
TXTATT1 = "For the attention of the Sales Manager"
End If
If cboatt1.Value = "Regnskabschef" Then
TXTATT1 = "For the attention of the Acounts Manager"
End If
If cboatt1.Value = "Logistikchef" Then
TXTATT1 = "For the attention of the Dispatch Manager"
End If
If cbostilling.Value = "Direktør" Then
TXTATT2 = "Managing Director"
End If
If cbostilling.Value = "Indkøbschef" Then
TXTATT2 = "Purchasing Manager"
End If
If cbostilling.Value = "Filialchef" Then
TXTATT2 = "Branch Manager"
End If
If cbostilling.Value = "Salgchef" Then
TXTATT2 = "Sales Manager"
End If
If cbostilling.Value = "Regnskabschef" Then
TXTATT2 = "Acounts Manager"
End If
If cbostilling.Value = "Logistikchef" Then
TXTATT2 = "Dispatch Manager"
End If
Application.ScreenUpdating = False
With ActiveDocument
.Bookmarks("afsenderadresse").Range.Text
txtafsenderadresse.Value
.Bookmarks("afsenderwww").Range.Text = txtafsenderwww.Value
.Bookmarks("afsenderemail").Range.Text
txtafsenderemail.Value
.Bookmarks("valgatt").Range.Text = cbovalgatt.Value
.Bookmarks("afsendertlf").Range.Text = txtafsendertlf.Value
.Bookmarks("afsenderfax").Range.Text = txtafsenderfax.Value
.Bookmarks("modtageradresse").Range.Text
txtmodtageradresse.Value
.Bookmarks("navn").Range.Text = txtnavn.Value
.Bookmarks("cc").Range.Text = txtcc.Value
.Bookmarks("enc").Range.Text = txtenc.Value
.Bookmarks("valgatt1").Range.Text = TXTATT.Value
.Bookmarks("deresref").Range.Text = txtderesref.Value
.Bookmarks("voresref").Range.Text = txtvoresref.Value
.Bookmarks("fortheatt").Range.Text = TXTATT1.Value
.Bookmarks("stilling").Range.Text = TXTATT2.Value
End With
Application.ScreenUpdating = True
Unload Me
Dim RetVal
RetVal = Shell("C:\lars\easyletters\Breve\menuen.exe", 1)
End Su
can help me.
I have a documents opening a forn as the first thing. I would to fil
this for with data and when I then press the ok button I would like t
open a small menu.exe program.
Dim RetVal
RetVal = Shell("C:\WINDOWS\System32\CALC.EXE", 1)
I can open this using the following code but my problem is that thi
only works if I have the complete path. I wan't to run the hole thin
from a cd-rom and therefore I don't know the exact path. I have thi
other I am using to open another dot file through the first dot file.
am using this code for this:
Dim letterofenquiry As Object
Set letterofenquiry = CreateObject("word.application")
letterofenquiry.Documents.Add ThisDocument.Path & "\"
"letter_enquiry.dot"
letterofenquiry.Visible = True
Can I use a little of the codes to get what I want or do you know
way??
BTW this is the code I am using for the form.
Any Help is so grat
Private Sub cmdOK_Click()
Dim strSenderAddress As String
If cbovalgatt.Value = "Dear Sir," Then
TXTATT = "Yours faithfully,"
End If
If cbovalgatt.Value = "Dear Madam," Then
TXTATT = "Yours faithfully,"
End If
If cbovalgatt.Value = "Dear Mr Jones," Then
TXTATT = "Yours sincerely,"
End If
If cbovalgatt.Value = "Dear Sirs," Then
TXTATT = "Yours faithfully,"
End If
If cbovalgatt.Value = "Mesdames," Then
TXTATT = "Your faithfully,"
End If
If cboatt1.Value = "Direktør" Then
TXTATT1 = "For the attention of the Managing Director"
End If
If cboatt1.Value = "Indkøbschef" Then
TXTATT1 = "For the attention of the Purchasing Manager"
End If
If cboatt1.Value = "Filialchef" Then
TXTATT1 = "For the attention of the Branch Manager"
End If
If cboatt1.Value = "Salgchef" Then
TXTATT1 = "For the attention of the Sales Manager"
End If
If cboatt1.Value = "Regnskabschef" Then
TXTATT1 = "For the attention of the Acounts Manager"
End If
If cboatt1.Value = "Logistikchef" Then
TXTATT1 = "For the attention of the Dispatch Manager"
End If
If cbostilling.Value = "Direktør" Then
TXTATT2 = "Managing Director"
End If
If cbostilling.Value = "Indkøbschef" Then
TXTATT2 = "Purchasing Manager"
End If
If cbostilling.Value = "Filialchef" Then
TXTATT2 = "Branch Manager"
End If
If cbostilling.Value = "Salgchef" Then
TXTATT2 = "Sales Manager"
End If
If cbostilling.Value = "Regnskabschef" Then
TXTATT2 = "Acounts Manager"
End If
If cbostilling.Value = "Logistikchef" Then
TXTATT2 = "Dispatch Manager"
End If
Application.ScreenUpdating = False
With ActiveDocument
.Bookmarks("afsenderadresse").Range.Text
txtafsenderadresse.Value
.Bookmarks("afsenderwww").Range.Text = txtafsenderwww.Value
.Bookmarks("afsenderemail").Range.Text
txtafsenderemail.Value
.Bookmarks("valgatt").Range.Text = cbovalgatt.Value
.Bookmarks("afsendertlf").Range.Text = txtafsendertlf.Value
.Bookmarks("afsenderfax").Range.Text = txtafsenderfax.Value
.Bookmarks("modtageradresse").Range.Text
txtmodtageradresse.Value
.Bookmarks("navn").Range.Text = txtnavn.Value
.Bookmarks("cc").Range.Text = txtcc.Value
.Bookmarks("enc").Range.Text = txtenc.Value
.Bookmarks("valgatt1").Range.Text = TXTATT.Value
.Bookmarks("deresref").Range.Text = txtderesref.Value
.Bookmarks("voresref").Range.Text = txtvoresref.Value
.Bookmarks("fortheatt").Range.Text = TXTATT1.Value
.Bookmarks("stilling").Range.Text = TXTATT2.Value
End With
Application.ScreenUpdating = True
Unload Me
Dim RetVal
RetVal = Shell("C:\lars\easyletters\Breve\menuen.exe", 1)
End Su