25 February 2016

Quickly Mute or Un-mute volume using VBS

Hello reader,

I find clicking on Volume icon on taskbar and wait few seconds to appear and clicking again on mute button was so time consuming.

So i did some Googling and found this awesome codes.

1. Copy code below and paste in Notepad.
   
Set WshShell = CreateObject("WScript.Shell")
WshShell.SendKeys(chr(173))
 
 

2. Save notepad as Mute.VBS to your desktop. I place mine near to Volume icon for easy access.

3. Simply double click VBS file to mute and un-mute.


Find from this original post.
http://www.dostips.com/forum/viewtopic.php?t=995

19 February 2016

Copy Cells From 2 Sheets and Paste to Outlook as Image


Hello,

Ini VBA yang aku edit dan tambah untuk snap cells untuk 2 sheets dan pasti ke dalam Outlook mail.
Disertakan juga sheet untuk To list dan Cc list.


==========================================================================

Sub OpenOutlook()


Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim strUser As String
Dim signature As String
Dim sTo As String
Dim sCC As String
Dim rng As Range

Set rng = Nothing
Set rng = ActiveSheet.UsedRange

'check outlook is open
Dim olApp As Object

CreateObject("shell.application").minimizeall

On Error Resume Next

Set olApp = GetObject(, "Outlook.Application")

On Error GoTo 0

If Not olApp Is Nothing Then
  'Outlook is open!
  'MsgBox "Outlook is running"
 
Else
  'Outlook not open
 
  'MsgBox "Outlook is not running"
  Shell ("OUTLOOK")
 
 
End If
'end check outlook is open
''''''


    'For To field
    Set emailRng = Worksheets("Email Contact").Range("A2:A30")

    For Each cl In emailRng
        sTo = sTo & ";" & cl.Value
    Next

    sTo = Mid(sTo, 2)

    'For CC field
    Set emailRngCC = Worksheets("Email Contact").Range("B2:B10")

    For Each cl In emailRngCC
        sCC = sCC & ";" & cl.Value
    Next

    sCC = Mid(sCC, 2)


Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
    With OutMail
    .Display
    End With
        signature = OutMail.HTMLBody


    'strbody = "Good Morning;We have completed our main aliasing process for today.  All assigned firms are complete.  Please feel free to respond with any questions.Thank you."
   
    strbody = "Hi all,Below are today's jobs in the lab."
   
    'strbody = "This is line 1" & "
" & _
    '          "This is line 2" & "
" & _
     '         "This is line 3" & "


"
             
             
    With OutMail
        .SentOnBehalfOfName = ""
        .To = sTo
        .CC = sCC
        .BCC = ""
        .Subject = "Jobs in Lab on  " & Format$(Date, "dd-mm-yyyy")
        .HTMLBody = strbody & RangetoHTMLPassdown(rng) & RangetoHTMLReport(rng) & signature
       
        .Display
        '.Send
    End With
   
   
'Sub GCloseJobsinLab()

  'Close opened jobs in lab from iFAct.
  Windows("Jobs in Lab").Close False
  Windows("Jobs_in_lab_Macro.xlsm").Close False
   
   
End Sub


Function RangetoHTMLReport(rng As Range)
' Changed by Ron de Bruin 28-Oct-2006
' Working in Office 2000-2013
    Dim fso As Object
    Dim ts As Object
    Dim TempFile As String
    Dim TempWB As Workbook

    TempFile = Environ$("temp") & "\" & Format(Now, "dd-mm-yy h-mm-ss") & ".htm"

    'Copy the range and create a new workbook to past the data in
   
'    rng.Copy
   
Sheets("Report").Select
Range("A1").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy

    Set TempWB = Workbooks.Add(1)
    With TempWB.Sheets(1)
        .Cells(1).PasteSpecial Paste:=8
        .Cells(1).PasteSpecial xlPasteValues, , False, False
        .Cells(1).PasteSpecial xlPasteFormats, , False, False
        .Cells(1).Select
        Application.CutCopyMode = False
        On Error Resume Next
        .DrawingObjects.Visible = True
        .DrawingObjects.Delete
        On Error GoTo 0
    End With

    'Publish the sheet to a htm file
    With TempWB.PublishObjects.Add( _
         SourceType:=xlSourceRange, _
         Filename:=TempFile, _
         Sheet:=TempWB.Sheets(1).Name, _
         Source:=TempWB.Sheets(1).UsedRange.Address, _
         HtmlType:=xlHtmlStatic)
        .Publish (True)
    End With

    'Read all data from the htm file into RangetoHTML
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.GetFile(TempFile).OpenAsTextStream(1, -2)
    RangetoHTMLReport = ts.readall
    ts.Close
    RangetoHTMLReport = Replace(RangetoHTMLReport, "align=center x:publishsource=", _
                          "align=left x:publishsource=")

    'Close TempWB
    TempWB.Close savechanges:=False

    'Delete the htm file we used in this function
    Kill TempFile

    Set ts = Nothing
    Set fso = Nothing
    Set TempWB = Nothing
End Function


Function RangetoHTMLPassdown(rng As Range)
' Changed by Ron de Bruin 28-Oct-2006
' Working in Office 2000-2013
    Dim fso As Object
    Dim ts As Object
    Dim TempFile As String
    Dim TempWB As Workbook

    TempFile = Environ$("temp") & "\" & Format(Now, "dd-mm-yy h-mm-ss") & ".htm"

    'Copy the range and create a new workbook to past the data in
   
'    rng.Copy
   
Sheets("Passdown Format").Select
'Range("A1").Select
'Range(Selection, Selection.End(xlToRight)).Select
'Range(Selection, Selection.End(xlDown)).Select
Range("A1:L27").Select
Selection.Copy

    Set TempWB = Workbooks.Add(1)
    With TempWB.Sheets(1)
        .Cells(1).PasteSpecial Paste:=8
        .Cells(1).PasteSpecial xlPasteValues, , False, False
        .Cells(1).PasteSpecial xlPasteFormats, , False, False
        .Cells(1).Select
        Application.CutCopyMode = False
        On Error Resume Next
        .DrawingObjects.Visible = True
        .DrawingObjects.Delete
        On Error GoTo 0
    End With

    'Publish the sheet to a htm file
    With TempWB.PublishObjects.Add( _
         SourceType:=xlSourceRange, _
         Filename:=TempFile, _
         Sheet:=TempWB.Sheets(1).Name, _
         Source:=TempWB.Sheets(1).UsedRange.Address, _
         HtmlType:=xlHtmlStatic)
        .Publish (True)
    End With

    'Read all data from the htm file into RangetoHTML
    Set fso = CreateObject("Scripting.FileSystemObject")
    Set ts = fso.GetFile(TempFile).OpenAsTextStream(1, -2)
    RangetoHTMLPassdown = ts.readall
    ts.Close
    RangetoHTMLPassdown = Replace(RangetoHTMLPassdown, "align=center x:publishsource=", _
                          "align=left x:publishsource=")

    'Close TempWB
    TempWB.Close savechanges:=False

    'Delete the htm file we used in this function
    Kill TempFile

    Set ts = Nothing
    Set fso = Nothing
    Set TempWB = Nothing
End Function
========================================================================


Paparkan Masa and Tarikh Menggunakan Command Prompt

Assalamualaikum,

Pagi ni nak kongsi kod yang aku guna untuk display Masa dan Tarikh menggunakan Command Prompt.

Pada mulanya, kod yang ditulis adalah seperti dibawah.

==================================================

@echo off

color f0

:Start

echo Flash on : %DATE%
echo Time     : %TIME%

pause
cls
Rem Goto Start


=================================================== 
Output



Oleh kerana CMD ini akan refresh setiap kali CMD diaktifkan, kod perlu di upgrade.


Maka datanglah versi ke-2.

=================================================
@echo off

echo Flash on :  %Date% %Time% > SEM_Flash.txt

notepad SEM_Flash.txt
::pause
exit

================================================= 


Output adalah dalam aplikasi Notepad
Font sais perlu ditetapkan sendiri dalam aplikasi Notepad.



 CMD akan terminate sekiranya Notepad ditutup, tetapi Notepad tidak akan ditutup sekiranya CMD dututup.




 

16 February 2016

Add Related Post Using LinkWithin


Alhamdulillah,

bila dah habis tulis post panjang panjang, nak la juga kita suggestkan related post kepada surfer.
caranya dengan menambah Widget LinkWithin.

Cara caranya seperti dibawah.

1. Pergi ke laman LinkWithin.com
2. Seterusnya masukkan details anda seperti contoh dibawah dan klik Get Widget!














3. Seterusnya ikut tutorial yang diberikan.


Semoga berjaya.

13 February 2016

Cara mudah muatturun Video dari Youtube

Salam sejahtera,

pagi ini saya ingin berkongsikan cara muatturun HD, SD video, MP3 paling mudah menggunakan aplikasi Videoder.

oleh kerana aplikasi ini tiada di dalam Play Store, anda perlu pergi ke link yang diberikan dibawah dan klik butang download.
Seterusnya install aplikasi tersebut.


http://www.videoder.net/


02 February 2016

Punyai lebih dari satu akaun Whatsapp dalam satu android phone

https://drive.google.com/file/d/0B22YOZjT5vinc2hMeDBmcmxfMzA/view?usp=docslist_api


Salam. Malam ni aku jumpa satu trik untuk install lebih dari satu Whatsapp no dalam satu applikasi WD.

Caranya dengan download dari link yang diberikan dan install.


Semak No IMEI

Salam sejahtera,

Petang ini saya kongsikan tips untuk menyemak no IMEI telefon bimbit anda.
Adakah ia asli atau sebaliknya.

Caranya sangat mudah. Anda hanya perlu mendail *#06# dan salinkan ke website IMEI.INFO dan klik butang Check.

Selamat muncuba.