Live-Forum - Die aktuellen Beiträge
Datum
Titel
17.04.2024 18:57:33
17.04.2024 16:56:58
Anzeige
Archiv - Navigation
1836to1840
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Arial Schrift wird nicht gesetzt

Arial Schrift wird nicht gesetzt
14.07.2021 11:55:25
Grischa
Hallo zusammen,
ich habe ein Skript für eine Email Signatur Erstellung geschrieben.
Die Schriftwart setze ich mit objSelection.Font.Name = "Arial"
Wenn ich Aria in Times New Roman ändere wird es übernommen. Nur eben Arial nicht.
Weiß zufällig jemand wodran das liegen könnte?
Liebe Grüße
Grischa Fritz

4
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: Arial Schrift wird nicht gesetzt
14.07.2021 12:12:19
Klaus
Hallo Grischa,
ganz wilde Vermutung: Vielleicht ist der Font "Arial" nicht installiert? Kannst du denn manuell auf Arial umschalten?
LG,
Klaus M.
AW: Arial Schrift wird nicht gesetzt
14.07.2021 12:31:57
Grischa
Hallo Klaus.
Ja das kann ich. Der Font ist auch installiert.
Hier ist mal der complete Code. Vielleicht ist ja irgendwo ein Fehler drin.
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
GetUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & GetUser)
GetFirstName = objUser.FirstName
GetLastName = objUser.LastName
GetTitle = objUser.Title
GetDepartment = objUser.Department
GetCompany = objUser.Company
GetPhone = objUser.TelephoneNumber
GetOtherPhone = objUser.otherTelephone
GetMobile = objUser.Mobile
GetEmail = objUser.EmailAddress
GetFax = objUser.FaxNumber
GetStreet = objUser.StreetAddress
GetZip = objUser.PostalCode
GetCity = objUser.l
GetState = objUser.State
GetHomepage = objUser.Homepage
GetNotes = objUser.Info
Regard = "Mit freundlichen Gr" & Chr(252) & Chr(223)& "en"
strLogo="C:\bild\HKLW_Logo_Signatur.gif"
Text1 = "ddddK" & Chr(220) & "HN L" & Chr(220) & "ER dddd"
tel = "T: "
fax = "F: "
P1 = "dddmit beschr" & Chr(228) & "nkter ddd"
P2 = "von ddd" & Chr(228) & "lten und ddd*"
P3 = "* Datenschutzinformationen / Registerangaben / Liste der ddd: "
P4 = "www.ddd.de"
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText Regard
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeParagraph()
objSelection.TypeText GetFirstName & Chr(32) & GetLastName & Chr(11)
objSelection.TypeText GetTitle
objSelection.TypeParagraph()
objSelection.InlineShapes.AddPicture(strLogo)
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText Text1 & Chr(11)
objSelection.TypeText P1 & Chr(11)
objSelection.Font.Color = RGB(255,128,0)
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "11"
objSelection.TypeText P2 & Chr(11)
objSelection.TypeText GetStreet & Chr(11)
objSelection.TypeText GetZip & Chr(32) & GetCity & Chr(11)
objSelection.TypeText tel
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,GetPhone & chr(11))
objSelection.TypeText fax
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,GetFax & chr(11))
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,GetEmail & chr(11))
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText P3
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,P4)
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Signatur", objSelection
objSignatureObject.NewMessageSignature = "Signatur"
objSignatureObject.ReplyMessageSignature = "Signatur"
objDoc.Saved = True
objWord.Quit
Wäre sehr net wenn Du mal drüber schauen würdest.
LG
Grischa
Anzeige
AW: Arial Schrift wird nicht gesetzt
14.07.2021 12:34:16
Grischa
Hallo Klaus.
Ja das kann ich. Der Font ist auch installiert.
Hier ist mal der complete Code. Vielleicht ist ja irgendwo ein Fehler drin.
On Error Resume Next
Set objSysInfo = CreateObject("ADSystemInfo")
GetUser = objSysInfo.UserName
Set objUser = GetObject("LDAP://" & GetUser)
GetFirstName = objUser.FirstName
GetLastName = objUser.LastName
GetTitle = objUser.Title
GetDepartment = objUser.Department
GetCompany = objUser.Company
GetPhone = objUser.TelephoneNumber
GetOtherPhone = objUser.otherTelephone
GetMobile = objUser.Mobile
GetEmail = objUser.EmailAddress
GetFax = objUser.FaxNumber
GetStreet = objUser.StreetAddress
GetZip = objUser.PostalCode
GetCity = objUser.l
GetState = objUser.State
GetHomepage = objUser.Homepage
GetNotes = objUser.Info
Regard = "Mit freundlichen Gr" & Chr(252) & Chr(223)& "en"
strLogo="C:\bild\HKLW_Logo_Signatur.gif"
Text1 = "ddddK" & Chr(220) & "HN L" & Chr(220) & "ER dddd"
tel = "T: "
fax = "F: "
P1 = "dddmit beschr" & Chr(228) & "nkter ddd"
P2 = "von ddd" & Chr(228) & "lten und ddd*"
P3 = "* Datenschutzinformationen / Registerangaben / Liste der ddd: "
P4 = "www.ddd.de"
Set objWord = CreateObject("Word.Application")
Set objDoc = objWord.Documents.Add()
Set objSelection = objWord.Selection
Set objEmailOptions = objWord.EmailOptions
Set objSignatureObject = objEmailOptions.EmailSignature
Set objSignatureEntries = objSignatureObject.EmailSignatureEntries
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText Regard
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeParagraph()
objSelection.TypeText GetFirstName & Chr(32) & GetLastName & Chr(11)
objSelection.TypeText GetTitle
objSelection.TypeParagraph()
objSelection.InlineShapes.AddPicture(strLogo)
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText Text1 & Chr(11)
objSelection.TypeText P1 & Chr(11)
objSelection.Font.Color = RGB(255,128,0)
objSelection.Font.Name = "Arial"
objSelection.Font.Size = "11"
objSelection.TypeText P2 & Chr(11)
objSelection.TypeText GetStreet & Chr(11)
objSelection.TypeText GetZip & Chr(32) & GetCity & Chr(11)
objSelection.TypeText tel
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,GetPhone & chr(11))
objSelection.TypeText fax
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,GetFax & chr(11))
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,GetEmail & chr(11))
objSelection.TypeParagraph()
objSelection.Font.Name = "Arial"
objSelection.Font.Size = 11
objSelection.TypeText P3
Set objLink = objSelection.Hyperlinks.Add(objSelection.Range,P4)
Set objSelection = objDoc.Range()
objSignatureEntries.Add "Signatur", objSelection
objSignatureObject.NewMessageSignature = "Signatur"
objSignatureObject.ReplyMessageSignature = "Signatur"
objDoc.Saved = True
objWord.Quit
Wäre sehr net wenn Du mal drüber schauen würdest.
LG
Grischa
Anzeige
AW: Arial Schrift wird nicht gesetzt
14.07.2021 13:38:12
Grischa
Problem ist behoben.
Set objSelection = objDoc.Range()
objDoc.Range.Font.Name = "Arial"
objDoc.Range.Font.Size = 11
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige