This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
' for 64-bit Office | |
Option Explicit | |
Private Declare PtrSafe Function CredWrite Lib "advapi32.dll" Alias "CredWriteW" (ByRef Credential As Credential, ByVal Flags As Long) As Long | |
Private Declare PtrSafe Function CredRead Lib "advapi32.dll" Alias "CredReadW" (ByVal TargetName As LongPtr, ByVal TypeVal As Long, ByVal Flags As Long, ByRef Credential As LongPtr) As Long | |
Private Declare PtrSafe Sub CredFree Lib "advapi32.dll" (ByVal Buffer As LongPtr) | |
Private Declare PtrSafe Sub CopyMemory Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As LongPtr) | |
Private Type FILETIME | |
dwLowDateTime As Long |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Dim m As Outlook.MailItem | |
Set m = GetMailItem(...) ' リプライした日時を取得したいMailItemを取得するなにか | |
' MailItemのPropertyAccessorを使ってリプライした日時を取得する | |
Dim pa As Outlook.PropertyAccessor | |
Set pa = m.PropertyAccessor | |
' MailItemの返信済ステータスを取得 | |
' 102: 返信, 103: 全員に返信, 104: 転送 | |
Dim replyStatus As Integer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# YAML to extract VBA source files for Azure Pipelines | |
variables: | |
TARGET_DIR: '.' | |
VBA_DIR: 'vba-src' | |
pool: | |
vmImage: 'ubuntu-latest' | |
steps: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from oletools.olevba import VBA_Parser, filter_vba | |
workbook_path = './macro.xlsx' | |
vba_parser = VBA_Parser(workbook_path) | |
vba_modules = vba_parser.extract_all_macros() if vba_parser.detect_vba_macros() else [] | |
for _, _, filename, content in vba_modules: | |
# Remove the "Attribute VB_*" lines which are not displayed in the VBA Editor. | |
filtered_content = filter_vba(content) |