2017年6月5日 星期一

[Windows Forms] [VB.NET] 取得日期 資料處理

'Get the first day of the month
'取得當月的第一天 Public Function FirstDayOfMonth(ByVal sourceDate As DateTime) As DateTime
  Return New DateTime(sourceDate.Year, sourceDate.Month, 1)
End Function


'Get the last day of the month
'取得當月的最後一天 Public Function LastDayOfMonth(ByVal sourceDate As DateTime) As DateTime
  Dim lastDay As DateTime = New DateTime(sourceDate.Year, sourceDate.Month, 1)
  Return lastDay.AddMonths(1).AddDays(-1)
End Function


'根據日期取得上個月的最後一天
Public Shared Function LastDayOfLastMonth(ByVal sourceDate As DateTime) As DateTime
        Dim lastDay As DateTime = New DateTime(sourceDate.Year, sourceDate.Month, 1)
        Return lastDay.AddMonths(0).AddDays(-1)
End Function


'根據日期取得下個月的第一天
Public Shared Function FirstDayOfNextMonth(ByVal sourceDate As DateTime) As DateTime
        Dim NextDay As DateTime = New DateTime(sourceDate.Year, sourceDate.Month, 1)
        Return NextDay.AddMonths(1).AddDays(0)

End Function

2017年5月23日 星期二

[Windows Forms] [VB.NET] TEXTBOX 輸入限制 -只能輸入字母

  Private Sub txtbox1_KeyPress(sender As Object, e As KeyPressEventArgs) Handles txtbox1.KeyPress
        '只能輸入字母
        If Char.IsLetter(e.KeyChar) = True Or Char.IsControl(e.KeyChar) = True Then
            e.Handled = False
        Else
            e.Handled = True
        End If
    End Sub

2017年1月23日 星期一

[ADOBE] [PDF] 文件轉向


如果你收到一個PDF 文件需要轉向,你又只有安裝Adobe Reader的話
可以試試看你的印表機如果有PDF Writer
就可以在Reader中再次列印,選到PDF Writer
另存檔案
就可以得到轉好的檔案唷!


如果你沒有PDF Writer
可以試著安裝 CutePDF Writer

[OFFICE 2010] [OUTLOOK] Outlook 中開啟或儲存電子郵件附件時出現錯誤訊息:「無法建立檔案」

Can not create file:XXXX. Right-click the folder you want to create the file in, and the click Properties on the shortcut menu to check your permissions for the folder.



1.[開始],再按一下 [執行],輸入 regedit

2.找出下列登錄機碼並按一下: 

HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security\
但這邊有個祕訣,你用肉眼找可能找不到Security這資料夾,一定要利用Edit →Find
用搜尋的方式才會找到在這各OUTLOOK底下有一個Security
接著可以看到右側的OutlookSecureTempFolder ,右鍵點選修改
COPY整段路徑到檔案總管中(此路徑是隨機的,你一定要透過regedit才能找到這各路徑)



接著手動清除此資料夾中的所有檔案,OUTLOOK也可以立即開啟檔案了!
另外~不用重開機啦!!

參考:
當您嘗試在 Outlook 中開啟或儲存電子郵件附件時出現錯誤訊息:「無法建立檔案」

2017年1月20日 星期五

[OFFICE 2010] [OUTLOOK] 用顏色辨識來信的人

[OFFICE 2010] [OUTLOOK] 用顏色辨識來信的人

1.  在OUTLOOK中先選擇收件匣(或是你想要的資料夾也可以)


2.    選擇Conditional Formatting 


3.    點選新增然後建立一個新的命名,接著你可以選擇FONT 來指定顏色


4.    選好顏色後按OK.


5.    點選Condition→點選From,利用Address Book找到你要指定的人(建議先將你要的人存在Address Book),這樣設定效果才會成功出來!
 



6.   確定後就可以囉!

[OFFICE 2010 ] [OUTLOOK] PST檔案太大,如何快速重新建立一個

先開一個新的PST 檔案NewItemsMoreItemsOutlookDataFile,檔案命名隨你~,存到你想要的地方

產生完後如果你的收件夾有些資料夾要跟著帶過去,但所有的信件不想全帶過去的話
你接著可以作下一步匯入的動作



選擇原本的PST 並將今天收到的信也一併帶過去

指定到新的PST


打開Account Setting


Change FolderYes 指定到新的PST


將新的PST指定為預設存放位置



※完成後重新開啟OUTLOOK





[OFFICE 2010] [ EXCEL] [WINOWS 10] 網站網頁下載下來的EXCEL 打不開檔案 打不開xls 開啟是空白的?

EXCEL 開啟後空白 請進入EXCEL 設定
FileOptions

Trust CenterTrust Center SettingProtected View
全部取消打勾→OK