Re: Add CommandBar WENN EditorType != Word
- From: "Rayek Atum" <claudia@xxxxxxxxxxxxx>
- Date: Fri, 12 May 2006 15:15:44 +0200
hallo, michael.
mein code sieht - glaub ich - schlecht aus.....:-(
ich habe einfach schon soviel probiert und nichts ging...
also, laufen tut jetzt einfach die abfrage, welchen typs der editor ist...
die auskommentierten zeilen habe ich jetzt bewußt dringelassen, vllt war ich
ja schon auf der richtigen spur, und habe nur eine winzige kleinigkeit
falsch gemacht...
ähm ich poste mal
[Code]-----------------------------------------------
On Error GoTo err_Trap
Dim myOlApp As Outlook.Application
Dim myItem As Outlook.MailItem
Dim OLButton As CommandBar
Dim myInspector As Outlook.Inspector
Set myOlApp = CreateObject("Outlook.Application")
Set myItem = myOlApp.CreateItem(olMailItem)
Set myInspector = myItem.GetInspector
Dim MyCustomBar As CommandBar
Dim cmdcDelAct As CommandBarButton
'
' For i = iCountButtons To 1 Step -1
' If myInspector.CommandBars("Sepp Maier").Controls.Item(i).Caption
= "Warumdennnetherrgott" Then
'
' myInspector.CommandBars("Sepp Maier").Controls.Item(i).Delete
'
' 'MsgBox "nr." & i & " mit name " & strControlName.Caption & "
wurde gelöscht!"
' End If
'
' Next i
'
'
If myInspector.EditorType = olEditorWord Then
'TRY1
MsgBox "Geil, endlich wieder M$ wörd!"
ElseIf myInspector.EditorType = olEditorHTML Then
Dim iCountButtons As Integer
Dim i As Integer
MsgBox "na, du inspector gadget!"
iCountButtons = myInspector.CommandBars("Sepp Maier").Controls.Count
MsgBox iCountButtons
MsgBox "kein Word!"
Set cmdcMenu = myInspector.CommandBars.Add("Sepp Maier")
' With cmdcMenu
'
' .BeginGroup = True
' .Caption = "Und noch ein test"
' .Visible = True
' End With
MsgBox "wo denne"
Set cmdcDelAct = cmdcMenu.Controls.Add(Type:=msoControlButton)
With cmdcDelAct
.BeginGroup = True
.Caption = "Warumdennnetherrgott"
.Visible = True
.Enabled = True
End With
' Set OLButton = myInspector.CommandBars '(Name:="turbo-uschi",
Temporary:=True)
' Dim cButton As CommandBarButton
' Set cButton = OLButton.Controls.Add(Type:=msoControlPopup, Before:=4,
Temporary:=True)
' With cButton
' .Caption = "Hurz"
' .Visible = True
' End With
'
' With OLButton
' .Controls.Add Type:=msoControlPopup, Before:=4, Temporary:=True
'
' .Visible = True
' End With
ElseIf myInspector.EditorType = olEditorRTF Then
MsgBox "ein RTF mailteil!"
ElseIf myInspector.EditorType = olEditorText Then
MsgBox "oh, wunderbar : ein PlainText!"
End If
myInspector.Display
' Dim oItem As MailItem
' MsgBox "ja, nee, is klar2!!!"
' Dim objInspector As Inspector
' MsgBox "ja, nee, is klar3!!!"
' Set objInspector = ActiveInspector.CurrentItem
' MsgBox "nerf,nerf,nerf!"
' MsgBox "ja, nee, is klar4!!!"
' 'objInspector.Activate
' MsgBox "ja, nee, is klar5!!!"
' If objInspector.GetInspector.EditorType = olEditorHTML Then
'
' 'If ActiveInspector.EditorType = olEditorHTML Then
'
' MsgBox "kühl, kein word"
' Else
' MsgBox "oooooh, doch schon wieder word"
' End If
' Set cmdcMenu =
ActiveInspector.CommandBars("File").Controls.Add(Type:=msoControlPopup,
Before:=4, Temporary:=True)
'
'
' Set cmdcDelAct = cmdcMenu.Controls.Add(Type:=msoControlButton)
' With cmdcDelAct
' .Caption = "Save as &Deliverable or Acitivity..."
' .Visible = True
' End With
'
' Set cmdcRelFil = cmdcMenu.Controls.Add(Type:=msoControlButton)
' With cmdcRelFil
' .Caption = "Save as &Related Document..."
' .Visible = True
' End With
'
[/code]-------------------------------------------------
wäre wirklich supi, wenn du da was findest, ich weiss nicht mehr ein noch
aus... :-((
liebe grüsse,
rayek
:-)
"Michael Bauer" <mb@xxxxxxxx> wrote in message
news:2vn98t29cz92.1v47prq77v692.dlg@xxxxxxxxxxxxx
Am Fri, 12 May 2006 13:39:10 +0200 schrieb Rayek Atum:
Das Erstellen des Buttons sollte funktionieren. Manche Eigenschaften sind
bei den Built-in-Menüs aber schreibgeschützt.
Wie sieht denn Dein Code aus?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
Hallo, Michael!EMAIL
erstmal Danke für die Antwort!!! :-)
Sorry, mein Fehler!!
ich schreibe das addin für Office 2003...(Excel, Word, Powerpoint und
Outlook)
bis auf o.g. problem geht alles wunderbar.
liebe grüsse,
rayek
"Michael Bauer" <mb@xxxxxxxx> wrote in message
news:1exbxdi7anc1q$.1ww49zhr2f5ej.dlg@xxxxxxxxxxxxx
Am Fri, 12 May 2006 10:20:17 +0200 schrieb Rayek Atum:
Guten Morgen! :-)
Ich versuche seit geraumer Zeit, über das Inspector-Objekt
selbstdefinierte
CommandBars hinzuzufügen, die dann unter dem menupunkt 'File' einer
erscheinen, was leider überhaupt nicht klappt.
(Word als Emaileditor deselektiert unter Optionen)
outlook selbst wird ja unterteilt in die explorer- und die
inspector-objekte
unterteilt...
im activeexplorer habe ich zumindest schoneinmal einen button erstellen
können, aber auch nicht unter dem Menupunkt 'File'.
Wenn ich dasselbe im Inspector probiere, gibt´s Type Mismatch, Object
Variable or withblock not set und ähnliche meldungen, die ich alle
schon
nicht mehr sehen kann...:-(
msdn bringt gar nichts, echt poor, und goggeln hat mich auch nicht
weitergebracht.
ich habe bereits dutzende beispiel codefragmente gefunden, die bezogen
sich
aber dann auf EditorType = Word, also genau das gegenteil von dem, was
ich
brauch´.
Da es mir mittlerweile das mit bestgehütete Geheimnis der Welt zu sein
scheint, wie das gehen könnte, hoffe ich, daß vllt hier jemand damit
schon
einmal erfahrungen gemacht hat....!!?
Ich bin echt dankbar für jeden Tip!!
Liebe Grüsse,
Rayek
:-)
Welche OL-Version?
--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --
.
- Follow-Ups:
- Re: Add CommandBar WENN EditorType != Word
- From: Rayek Atum
- Re: Add CommandBar WENN EditorType != Word
- From: Michael Bauer
- Re: Add CommandBar WENN EditorType != Word
- References:
- Add CommandBar WENN EditorType != Word
- From: Rayek Atum
- Re: Add CommandBar WENN EditorType != Word
- From: Michael Bauer
- Re: Add CommandBar WENN EditorType != Word
- From: Rayek Atum
- Re: Add CommandBar WENN EditorType != Word
- From: Michael Bauer
- Add CommandBar WENN EditorType != Word
- Prev by Date: Re: Zwei Exchange Server in einem Outlook Profil?
- Next by Date: Re: Wie kann ich Attachments im Serienbrief verschicken
- Previous by thread: Re: Add CommandBar WENN EditorType != Word
- Next by thread: Re: Add CommandBar WENN EditorType != Word
- Index(es):