This file contains hidden or 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
| Sub 一鍵合併執行PowerShell() | |
| Dim cell As Range | |
| Dim allCommands As String | |
| Dim targetRange As Range | |
| Dim count As Integer | |
| ' 1. 設定範圍與初始化 | |
| Set targetRange = Range("A1:A100") | |
| allCommands = "" | |
| count = 0 |
This file contains hidden or 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
| # 1. 設定來源資料夾 | |
| $sourcePath = "$home\Downloads" | |
| # 2. 設定「關鍵字」對應的「目標資料夾」 | |
| $rules = @{ | |
| "*發票*" = "D:\財務整理\電子發票" | |
| "*報告*" = "D:\工作項目\週報" | |
| "*截圖*" = "C:\Users\User\Pictures\Screenshots" | |
| } |
This file contains hidden or 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
| Sub AddCompanyHeaderFooter_Fixed_v3() | |
| Dim ws As Worksheet | |
| Dim lastRow As Long, lastCol As Long | |
| Dim totalWidth As Double | |
| Dim logoPath As String | |
| Dim pic As Picture | |
| Dim i As Integer | |
| Dim footerStartRow As Long | |
| ' 如果沒開啟任何活簿則結束 |