搜尋此網誌

2020年11月24日 星期二

Linux LPD Printer用指令的方式改IP Address How do I modify a printer's IP address in CUPS? use command line

 CUPS的設定存再於/etc/cups下

相關的印表機設定存於printers.conf中

注意:要編輯printers.conf時,一定要將CUPS Service停掉

修改步驟:

  1. cd /etc/cups
  2. 停止CUPS Service
    /etc/rc.d/init.d/cups stop
  3. vi printers.conf
  4. 將檔案中要改的IP修改掉並存檔
  5. 重新啟動CUPS service
    /etc/rc.d/init.d/cups start
  6. 收工
參考文件:
    https://askubuntu.com/questions/913480/how-do-i-modify-a-printers-ip-address-in-cups
    




2020年11月17日 星期二

word VBA Change active file & 將指定的word檔關掉

 Document.Activate 方法 (Word),

參考網頁:https://docs.microsoft.com/zh-tw/office/vba/api/word.document.activate

Sub OpenSales()

'Sales.doc must exist and be open but not active. Documents("Sales.doc").Activate End Sub

指定某個word關掉的方式:
有其它很多方式,參考網頁:https://bettersolutions.com/word/documents/vba-closing.htm

Application.Documents("document.doc").Close 
Documents("document.doc").Close
Documents(1).Close
objDocument.Close
Close後面可以加上參數 
wdDoNotSaveChanges、 wdPromptToSaveChanges或wdSaveChanges。