Ide: Lòt lang yo se Google-tradui. Ou ka vizite a English vèsyon nan lyen sa a.
Ouvri yon sesyon
x
or
x
x
enskri
x

or

Ki jan yo otomatikman elaji tout dosye lè yo kòmanse pespektiv?

Anjeneral pale, si ou elaji oswa efondre yon katab sou Navigasyon fenèt la ak Lè sa a, fèmen Outlook la, katab la ap rete agrandi oswa efondreman lè rekòmanse Outlook. Men koulye a, ki gen yon fason yo elaji tout dosye otomatikman lè yo kòmanse Outlook? Atik sa a pral prezante yon VBA pou konplete travay la.

Otomatikman elaji tout dosye lè yo kòmanse pespektiv ak VBA

Kutools pou pespektiv: 100 + Zouti avanse avanse pou pespektiv.
Biwo Tab: Pèmèt Tabbed Korije ak Navigasyon nan Biwo, Jis tankou Chrome, Firefox, IE 8 / 9 / 10.
Klasik Menu: Pote vye meni ak zouti Retounen nan Biwo 2007, 2010, 2013, 2016 ak 2019.

flèch ble jarèt dwatOtomatikman elaji tout dosye lè yo kòmanse pespektiv ak VBA

Metòd sa a pral prezante yon VBA pou otomatikman elaji tout dosye sou fenèt Navigasyon an lè ou kòmanse Outlook. Tanpri aplike VBA sa a jan sa a:

1. Peze Alt + F11 kle ansanm pou ouvri Microsoft Visual Basic pou aplikasyon pou fenèt.

2. Elaji la Pwojè 1 ak Microsoft Outlook Objè nan fenèt la Pwojè, doub klike sou yo louvri a ThisOutlookSession fenèt, ak Lè sa a, keratin anba a VBA postal nan li.

VBA: Otomatikman elaji tout dosye nan Outlook

Private Sub Application_Startup()
ExpandAllFolders
End Sub

Private Sub ExpandAllFolders()
On Error Resume Next
Dim Ns As Outlook.NameSpace
Dim Folders As Outlook.Folders
Dim CurrF As Outlook.MAPIFolder
Dim F As Outlook.MAPIFolder
Dim ExpandDefaultStoreOnly As Boolean

  ExpandDefaultStoreOnly = False

  Set Ns = Application.GetNamespace("Mapi")
Set CurrF = Application.ActiveExplorer.CurrentFolder

  If ExpandDefaultStoreOnly = True Then
Set F = Ns.GetDefaultFolder(olFolderInbox)
Set F = F.Parent
Set Folders = F.Folders
LoopFolders Folders, True

  Else
LoopFolders Ns.Folders, True
End If

  DoEvents
Set Application.ActiveExplorer.CurrentFolder = CurrF
End Sub

Private Sub LoopFolders(Folders As Outlook.Folders, _
ByVal bRecursive As Boolean _
)
Dim F As Outlook.MAPIFolder

  For Each F In Folders
Set Application.ActiveExplorer.CurrentFolder = F
DoEvents

    If bRecursive Then
If F.Folders.Count Then
LoopFolders F.Folders, bRecursive
End If
End If
Next
End Sub

3. Sove kòd la epi fèmen Microsoft vizyèl Debaz pou aplikasyon pou fenèt la.

Depi kounye a, lè rekòmanse pespektiv, tout dosye yo pral otomatikman elaji nan pespektiv.nòt: VBA sa a pa ka louvri dosye rechèch yo tonbe lè rekòmanse pespektiv.


flèch ble jarèt dwatAtik ki gen rapò



Kutools pou pespektiv

Plis pase 100 Fonksyon avanse pou pespektiv 2010, 2013, 2016, 2019 ak 365

ekran piki kutools pou pespektiv ti pou banyè 201812

Plis Features | Telechaje gratis | Se sèlman $ 39.00 pou dè santèn de fonksyon

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Selvi · 7 months ago
    Thank you so much.. It solved my problem. :)