|
Private Sub btnDuits_Click()
On Error GoTo errtrap
Documents.Add Template:="Brief DU.dot", newtemplate:=False
Unload frm_menu
ActiveDocument.Unprotect
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
adress = Application.GetAddress(Name:="", addressproperties:="<PR_STREET_ADDRESS>" & vbCr & "<PR_POSTAL_CODE>" & " " & "<PR_LOCALITY>" & vbCr & "<PR_COUNTRY>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
If companyaddress = "" Then GoTo verder
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:="zHv " & cc
.TypeParagraph
.TypeText Text:=adress
End With
verder:
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
errtrap:
If Err = 5174 Then MsgBox "Template not found"
End Sub
Private Sub btnFaxDuits_Click()
On Error GoTo errtrap
Documents.Add Template:="Fax Duits.dot", newtemplate:=False
ActiveDocument.Unprotect
'dit gedeelte haalt het adres fax en tel nummer uit outlook
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
If companyaddress = "" Then GoTo verder:
rectelefoon = Application.GetAddress(Name:="", addressproperties:="<PR_OFFICE_TELEPHONE_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
recfax = Application.GetAddress(Name:="", addressproperties:="<PR_BUSINESS_FAX_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:=cc
End With
ActiveDocument.Bookmarks("rectel").Select
With Selection
.TypeText Text:=rectelefoon
End With
ActiveDocument.Bookmarks("recfax").Select
With Selection
.TypeText Text:=recfax
End With
verder:
ActiveDocument.Bookmarks("tekstvak5").Select
With Selection
.TypeText Text:=afdeling.Value
End With
ActiveDocument.Bookmarks("mailadres").Select
With Selection
.TypeText Text:=mail.Value
End With
ActiveDocument.Bookmarks("tel").Select
With Selection
.TypeText Text:=telefoon.Value
End With
ActiveDocument.Bookmarks("fax").Select
With Selection
.TypeText Text:=fax.Value
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Unload frm_menu
errtrap:
If Err = 5174 Then MsgBox "Template not found"
End Sub
Private Sub btnFaxEngels_Click()
On Error GoTo errtrap
Documents.Add Template:="Fax Eng.dot", newtemplate:=False
ActiveDocument.Unprotect
'dit gedeelte haalt het adres fax en tel nummer uit outlook
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
If companyaddress = "" Then GoTo verder
rectelefoon = Application.GetAddress(Name:="", addressproperties:="<PR_OFFICE_TELEPHONE_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
recfax = Application.GetAddress(Name:="", addressproperties:="<PR_BUSINESS_FAX_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:=cc
End With
ActiveDocument.Bookmarks("rectel").Select
With Selection
.TypeText Text:=rectelefoon
End With
ActiveDocument.Bookmarks("recfax").Select
With Selection
.TypeText Text:=recfax
End With
verder:
ActiveDocument.Bookmarks("tekstvak5").Select
With Selection
.TypeText Text:=afdeling.Value
End With
ActiveDocument.Bookmarks("mailadres").Select
With Selection
.TypeText Text:=mail.Value
End With
ActiveDocument.Bookmarks("tel").Select
With Selection
.TypeText Text:=telefoon.Value
End With
ActiveDocument.Bookmarks("fax").Select
With Selection
.TypeText Text:=fax.Value
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Unload frm_menu
errtrap:
If Err = 5174 Or Err = 5137 Then MsgBox "Template not found"
End Sub
Private Sub btnFaxEngelsN_Click()
On Error GoTo errtrap
'ChangeFileOpenDirectory "\\VADOBAG-SBS\data\Afdeling\Sjablonen\"
Documents.Add Template:="Fax Eng.dot", newtemplate:=False
ActiveDocument.Unprotect
'dit gedeelte haalt het adres fax en tel nummer uit outlook
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
If companyaddress = "" Then GoTo verder
rectelefoon = Application.GetAddress(Name:="", addressproperties:="<PR_OFFICE_TELEPHONE_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
recfax = Application.GetAddress(Name:="", addressproperties:="<PR_BUSINESS_FAX_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:=cc
End With
ActiveDocument.Bookmarks("rectel").Select
With Selection
.TypeText Text:=rectelefoon
End With
ActiveDocument.Bookmarks("recfax").Select
With Selection
.TypeText Text:=recfax
End With
verder:
ActiveDocument.Bookmarks("tekstvak5").Select
With Selection
.TypeText Text:=afdeling.Value
End With
ActiveDocument.Bookmarks("mailadres").Select
With Selection
.TypeText Text:=mail.Value
End With
ActiveDocument.Bookmarks("tel").Select
With Selection
.TypeText Text:=telefoon.Value
End With
ActiveDocument.Bookmarks("fax").Select
With Selection
.TypeText Text:=fax.Value
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Unload frm_menu
errtrap:
If Err = 5174 Then MsgBox "Template not found"
End Sub
Private Sub btnFaxnederlands_Click()
On Error GoTo errtrap
Documents.Add Template:="Fax Nl.dot", newtemplate:=False
ActiveDocument.Unprotect
'dit gedeelte haalt het adres fax en tel nummer uit outlook
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
If companyaddress = "" Then GoTo verder
rectelefoon = Application.GetAddress(Name:="", addressproperties:="<PR_OFFICE_TELEPHONE_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
recfax = Application.GetAddress(Name:="", addressproperties:="<PR_BUSINESS_FAX_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:=cc
End With
ActiveDocument.Bookmarks("rectel").Select
With Selection
.TypeText Text:=rectelefoon
End With
ActiveDocument.Bookmarks("recfax").Select
With Selection
.TypeText Text:=recfax
End With
verder:
ActiveDocument.Bookmarks("tekstvak5").Select
With Selection
.TypeText Text:=afdeling.Value
End With
ActiveDocument.Bookmarks("mailadres").Select
With Selection
.TypeText Text:=mail.Value
End With
ActiveDocument.Bookmarks("tel").Select
With Selection
.TypeText Text:=telefoon.Value
End With
ActiveDocument.Bookmarks("fax").Select
With Selection
.TypeText Text:=fax.Value
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Unload frm_menu
errtrap:
If Err = 5174 Then MsgBox "Template not found"
End Sub
Private Sub btnFaxNI_Click()
On Error GoTo errtrap
'ChangeFileOpenDirectory "\\VADOBAG-SBS\data\Afdeling\Sjablonen\"
Documents.Add Template:="Fax Nl.dot", newtemplate:=False
ActiveDocument.Unprotect
'dit gedeelte haalt het adres fax en tel nummer uit outlook
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
If companyaddress = "" Then GoTo verder
rectelefoon = Application.GetAddress(Name:="", addressproperties:="<PR_OFFICE_TELEPHONE_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
recfax = Application.GetAddress(Name:="", addressproperties:="<PR_BUSINESS_FAX_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:=cc
End With
ActiveDocument.Bookmarks("rectel").Select
With Selection
.TypeText Text:=rectelefoon
End With
ActiveDocument.Bookmarks("recfax").Select
With Selection
.TypeText Text:=recfax
End With
verder:
ActiveDocument.Bookmarks("tekstvak5").Select
With Selection
.TypeText Text:=afdeling.Value
End With
ActiveDocument.Bookmarks("mailadres").Select
With Selection
.TypeText Text:=mail.Value
End With
ActiveDocument.Bookmarks("tel").Select
With Selection
.TypeText Text:=telefoon.Value
End With
ActiveDocument.Bookmarks("fax").Select
With Selection
.TypeText Text:=fax.Value
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Unload frm_menu
errtrap:
If Err = 5174 Then MsgBox "Template not found"
End Sub
Private Sub btnFaxSPni_Click()
On Error GoTo errtrap
Documents.Add Template:="Sjablonen Special Products\Fax Nl.dot", newtemplate:=False
ActiveDocument.Unprotect
'dit gedeelte haalt het adres fax en tel nummer uit outlook
companyaddress = Application.GetAddress(Name:="", addressproperties:="<PR_company_name>", checknamesdialog:=False)
If companyaddress = "" Then GoTo verder
rectelefoon = Application.GetAddress(Name:="", addressproperties:="<PR_OFFICE_TELEPHONE_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
recfax = Application.GetAddress(Name:="", addressproperties:="<PR_BUSINESS_FAX_NUMBER>", displayselectdialog:=2, checknamesdialog:=False)
cc = Application.GetAddress(Name:="", addressproperties:="<PR_DISPLAY_NAME>", displayselectdialog:=2, checknamesdialog:=False)
ActiveDocument.Bookmarks("bedrijf").Select
With Selection
.TypeText Text:=companyaddress
.TypeParagraph
.TypeText Text:=cc
End With
ActiveDocument.Bookmarks("rectel").Select
With Selection
.TypeText Text:=rectelefoon
End With
ActiveDocument.Bookmarks("recfax").Select
With Selection
.TypeText Text:=recfax
End With
verder:
ActiveDocument.Bookmarks("tekstvak5").Select
With Selection
.TypeText Text:=afdeling.Value
End With
ActiveDocument.Bookmarks("mailadres").Select
With Selection
.TypeText Text:=mail.Value
End With
ActiveDocument.Bookmarks("tel").Select
With Selection
.TypeText Text:=telefoon.Value
End With
ActiveDocument.Bookmarks("fax").Select
With Selection
.TypeText Text:=fax.Value
End With
ActiveDocument.Protect Type:=wdAllowOnlyFormFields, NoReset:=True
Unload frm_menu
errtrap:
If Err = 5174 Then MsgBox "Template not found"
End Sub
|
|