Monday, 27 July 2020

VBA Code to insert mutiple images in Microsoft Word without file extension like jpg, png

Sub PicturesWithCaption()
    Dim xFileDialog As FileDialog
    Dim xPath, xFile As Variant
    Dim FileName() As String
    On Error Resume Next
    Set xFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
    If xFileDialog.Show = -1 Then
        xPath = xFileDialog.SelectedItems.Item(1)
        If xPath <> "" Then
            xFile = Dir(xPath & "\*.*")
            Do While xFile <> ""
                If UCase(Right(xFile, 3)) = "PNG" Or _
                    UCase(Right(xFile, 3)) = "TIF" Or _
                    UCase(Right(xFile, 3)) = "JPG" Or _
                    UCase(Right(xFile, 3)) = "GIF" Or _
                    UCase(Right(xFile, 3)) = "BMP" Then
                    With Selection
                        .InlineShapes.AddPicture xPath & "\" & xFile, False, True
                        .InsertAfter vbCrLf
                        .MoveDown wdLine
                         FileName = Split(xFile, ".")
                        .Text = FileName(0) & Chr(10)
                        .MoveDown wdLine
                    End With
                End If
                xFile = Dir()
            Loop
        End If
    End If
End Sub

Wednesday, 15 July 2020

Search faster in Google Chrome

Type A then tab to search on amazon
Type Y then tab to search on Youtube
Type FB then tab to search on Facebook
Type 

Sunday, 12 July 2020

Run commands

mstsc - Remote Desktop Connection















mspaint

Open Bluetooth settings - ms-settings:bluetooth 

control sound 

powerpnt
winword
excel

Thursday, 21 May 2020

Windows 10 Run commands

Change Brightness

Open Windows ?settings  - Windows + I

or

Open Run (Windows + R)
ms-settings:display

Other
ms-settings:windowsupdate

Check battery percentage
ms-settings:batterysaver

Bluetooth
ms-settings:bluetooth

Saturday, 16 May 2020

VLC Shortcuts

Ctrl + E - Effects to rotate video

- (near backspace) reduce video speed 

Tuesday, 23 July 2019

VBA Code to insert mutiple images in Microsoft Word



Use below code 

Sub PicturesWithCaption()
    Dim xFileDialog As FileDialog
    Dim xPath, xFile As Variant
    On Error Resume Next
    Set xFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
    If xFileDialog.Show = -1 Then
        xPath = xFileDialog.SelectedItems.Item(1)
        If xPath <> "" Then
            xFile = Dir(xPath & "\*.*")
            Do While xFile <> ""
                If UCase(Right(xFile, 3)) = "PNG" Or _
                    UCase(Right(xFile, 3)) = "TIF" Or _
                    UCase(Right(xFile, 3)) = "JPG" Or _
                    UCase(Right(xFile, 3)) = "GIF" Or _
                    UCase(Right(xFile, 3)) = "BMP" Then
                    With Selection
                        .InlineShapes.AddPicture xPath & "\" & xFile, False, True
                        .InsertAfter vbCrLf
                        .MoveDown wdLine
                        .Text = xFile & Chr(10)
                        .MoveDown wdLine
                    End With
                End If
                xFile = Dir()
            Loop
        End If
    End If
End Sub