title image


Smiley Re: Datei-neu-Dialog immer in Listenansicht?
Hallo,



dasselbe wie vorhin, nur diesmal für Datei öffnen mit Auswahl.

Sub DateiÖffnen()

'nur für Word XP

If Application.Documents.Count = 0 Then Documents.Add



Set bln = Assistant.NewBalloon

With bln

.Heading = vbCrLf & "Word XP-Ansichten"

.Text = " Datei öffnen mit ..."

.Labels(1).Text = "Ansicht Liste"

.Labels(2).Text = "Ansicht Eigenschaft"

.Labels(3).Text = "Ansicht Details"

.BalloonType = msoBalloonTypeButtons

.Mode = msoModeModeless

.Callback = "DemoDialoge"

.Icon = msoIconAlertInfo

.Button = msoButtonSetCancel

.Show

End With



'evtl. auskommentieren, sonst werden keine Smarttags angezeigt

With ActiveWindow

With .View

.DisplaySmartTags = False

End With

End With



With ActiveDocument

.EmbedSmartTags = False

.SmartTagsAsXMLProps = False

End With



With Options

.LabelSmartTags = False

.DisplaySmartTagButtons = False

'der fehlte noch in der Sammlung

.SmartParaSelection = False

End With

End Sub



Private Sub DemoDialoge(bln As Balloon, lbtn As Long, lPriv As Long)

Assistant.Animation = msoAnimationBeginSpeaking



Select Case lbtn

Case 1

bln.Close

AnsichtListe

Case 2

bln.Close

AnsichtEigenschaften

Case 3

bln.Close

AnsichtDetails

Case Else

bln.Close

End Select

End Sub



'====================================

Private Sub AnsichtListe()

'Ansicht Liste

Dim dlgOpen As FileDialog, DefDocPath

DefDocPath = Dialogs(wdDialogToolsOptionsFileLocations).Setting

ChangeFileOpenDirectory DefDocPath



Set dlgOpen = Application.FileDialog(FileDialogType:=msoFileDialogOpen)



With dlgOpen

.InitialFileName = "*.doc"

.AllowMultiSelect = False

.InitialView = msoFileDialogViewList

If .Show = 0 Then Exit Sub

End With



Documents.Open FileName:=dlgOpen.SelectedItems(1)

End Sub

'====================================



Private Sub AnsichtEigenschaften()

Dim dlgOpen As FileDialog, DefDocPath

DefDocPath = Dialogs(wdDialogToolsOptionsFileLocations).Setting

ChangeFileOpenDirectory DefDocPath



Set dlgOpen = Application.FileDialog(FileDialogType:=msoFileDialogOpen)



With dlgOpen

.InitialFileName = "*.doc"

.AllowMultiSelect = False

.InitialView = msoFileDialogViewProperties

If .Show = 0 Then Exit Sub

End With



Documents.Open FileName:=dlgOpen.SelectedItems(1)

End Sub

'====================================



Private Sub AnsichtDetails()

Dim dlgOpen As FileDialog, DefDocPath

DefDocPath = Dialogs(wdDialogToolsOptionsFileLocations).Setting

ChangeFileOpenDirectory DefDocPath



Set dlgOpen = Application.FileDialog(FileDialogType:=msoFileDialogOpen)



With dlgOpen

.InitialFileName = "*.doc"

.AllowMultiSelect = False

.InitialView = msoFileDialogViewDetails

If .Show = 0 Then Exit Sub

End With



Documents.Open FileName:=dlgOpen.SelectedItems(1)

End Sub



      Hubert



geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: