メインコンテンツへスキップ

Outlookの[名前の選択]リストでFAX番号を非表示にするにはどうすればよいですか?

Outlookで、[名前の選択]リストまたはアドレス帳の[電子メールアドレス]列に、電子メールアドレスだけでなく、迷惑になる可能性のあるFAXエントリも含まれていることに気付いたかもしれません。 この記事では、FAX番号を非表示にするいくつかの方法を紹介します。
doc隠しファックス番号1

VBAを使用して[名前の選択]リストでFAX番号を非表示にする


VBAを使用して[名前の選択]リストでFAX番号を非表示にする

[名前の選択]リストで既存のFAX番号を非表示にする場合は、次のようにしてください。

1。 押す Altキー+ F11 有効にするキー アプリケーション向け Microsoft Visual Basic 窓。

2。 クリック インセット > モジュール 新しい空のモジュールを挿入するには、以下のコードをコピーしてスクリプトに貼り付けます。

VBA:[名前の選択]で既存のFAX番号を非表示にする

Sub HideFaxNumbers_ExistingContacts()
'UpdatebyExtendoffice2018-5-23
Dim xStores As Outlook.Stores
Dim xStore As Outlook.Store
Dim xRootFolder As Outlook.Folder
Dim xFolder As Folder
On Error Resume Next
Set xStores = Outlook.Application.Session.Stores
For Each xStore In xStores
    Set xRootFolder = xStore.GetRootFolder
    For Each xFolder In xRootFolder.Folders
        Call ProcessFolders(xFolder)
    Next
Next
End Sub
Sub ProcessFolders(ByVal CurrentFolder As Outlook.Folder)
Dim xContactItem As Outlook.ContactItem
Dim xSubFolder As Outlook.Folder
Dim xFax As String
Dim I As Integer
On Error Resume Next
If CurrentFolder.DefaultItemType <> olContactItem Then Exit Sub
xFax = "Fax: "
For I = CurrentFolder.Items.Count To 1 Step -1
    Set xContactItem = CurrentFolder.Items.Item(I)
    With xContactItem
        If (Len(.BusinessFaxNumber) <> 0) And InStrRev(.BusinessFaxNumber, Trim(xFax)) = 0 Then
            .BusinessFaxNumber = xFax & .BusinessFaxNumber
        End If
        If (Len(.HomeFaxNumber) <> 0) And InStrRev(.HomeFaxNumber, Trim(xFax)) = 0 Then
            .HomeFaxNumber = xFax & .HomeFaxNumber
        End If
        If (Len(.OtherFaxNumber) <> 0) And InStrRev(.OtherFaxNumber, Trim(xFax)) = 0 Then
            .OtherFaxNumber = xFax & .OtherFaxNumber
        End If
        .Save
    End With
Next I
If CurrentFolder.Folders.Count <> 0 Then
    For I = CurrentFolder.Folders.Count To 1 Step -1
        Set xSubFolder = CurrentFolder.Folders.Item(I)
        Call ProcessFolders(xSubFolder)
    Next I
End If
End Sub

3。 押す F5 コードを実行するためのキー。これで、FAX番号が非表示になりました。
doc隠しファックス番号2

新しい連絡先でFAX番号を非表示にする場合は、次のようにします。

1。 押す Altキー+ F11 有効にするキー アプリケーション向け Microsoft Visual Basic 窓。

2。 ダブルクリック このOutlookSession   プロジェクト-1 ペインをクリックし、以下のコードをコピーしてスクリプトに貼り付けます。

VBA:新しく追加された連絡先のFAX番号を非表示にする

Public WithEvents xInspectors As Outlook.Inspectors
Public WithEvents xContactItem As Outlook.ContactItem
Private Sub Application_Startup()
'UpdatebyExtendoffice2018-5-23
    Set xInspectors = Outlook.Application.Inspectors
End Sub
Private Sub xInspectors_NewInspector(ByVal Inspector As Inspector)
If TypeName(Inspector.CurrentItem) = "ContactItem" Then
    Set xContactItem = Inspector.CurrentItem
End If
End Sub
Private Sub xContactItem_PropertyChange(ByVal Name As String)
Dim xArr() As Variant
Dim xFax As String
On Error Resume Next
xArr = Array("BusinessFaxNumber", "HomeFaxNumber", "OtherFaxNumber")
xFax = "Fax: "
With xContactItem
    Select Case Name
        Case xArr(0)
            If InStrRev(.BusinessFaxNumber, Trim(xFax)) = 0 Then
                .BusinessFaxNumber = xFax & .BusinessFaxNumber
            End If
        Case xArr(1)
            If InStrRev(.HomeFaxNumber, Trim(xFax)) = 0 Then
                .HomeFaxNumber = xFax & .HomeFaxNumber
            End If
        Case xArr(2)
            If InStrRev(.OtherFaxNumber, Trim(xFax)) = 0 Then
                .OtherFaxNumber = xFax & .OtherFaxNumber
            End If
    End Select
End With
End Sub
doc隠しファックス番号3

3.コードを保存し、Outlookを再起動して、コードを有効にします。

今後、新しく作成された連絡先のすべてのファックス番号は、[名前の選択:連絡先]ウィンドウで非表示になります。

doc隠しファックス番号4
下向き矢印
doc隠しファックス番号5

最高のオフィス生産性向上ツール

Outlook用Kutools - Outlook を強化する 100 以上の強力な機能

🤖 AIメールアシスタント: AI の魔法を備えたインスタント プロのメール - ワンクリックで天才的な返信、完璧な口調、多言語の習得。メールを簡単に変革しましょう! ...

📧 自動メール: 不在時 (POP および IMAP で利用可能)  /  メール送信のスケジュール設定  /  メール送信時のルールによる自動CC/BCC  /  自動転送 (高度なルール)   /  あいさつを自動追加   /  複数受信者の電子メールを個別のメッセージに自動的に分割する ...

📨 電子メール管理: メールを簡単に思い出す  /  件名などで詐欺メールをブロック  /  重複するメールを削除する  /  高度な検索  /  フォルダーを統合する ...

📁 アタッチメント プロバッチ保存  /  バッチデタッチ  /  バッチ圧縮  /  自動保存   /  自動デタッチ  /  自動圧縮 ...

🌟 インターフェースマジック: 😊もっと可愛くてクールな絵文字   /  タブ付きビューで Outlook の生産性を向上  /  Outlook を閉じる代わりに最小化する ...

???? ワンクリックの驚異: 受信した添付ファイルをすべてに返信する  /   フィッシングメール対策  /  🕘送信者のタイムゾーンを表示 ...

👩🏼‍🤝‍👩🏻 連絡先とカレンダー: 選択したメールから連絡先を一括追加  /  連絡先グループを個別のグループに分割する  /  誕生日のリマインダーを削除する ...

オーバー 100の特長 あなたの探索をお待ちしています! ここをクリックして詳細をご覧ください。

 

 

Comments (1)
No ratings yet. Be the first to rate!
This comment was minimized by the moderator on the site
Hi, this macro is great, it solved my issue!I have just one question: do I have to run it each time I open OutLook? Or is there a way to automate the macro?Thank you!
There are no comments posted here yet
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations