Skip to content

Instantly share code, notes, and snippets.

Thierry Dalon tdalon

Block or report user

Report or block tdalon

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
tdalon / CheckTodayReminders.bas
Last active May 7, 2019
Outlook vba to check appointment reminders
View CheckTodayReminders.bas
Sub CheckTodayReminders()
Dim objAppointments As Outlook.Items
Dim objTodayAppointments As Outlook.Items
Dim strFilter As String
Dim objAppointment As Outlook.AppointmentItem ' Object
Set objAppointments = Application.Session.GetDefaultFolder(olFolderCalendar).Items
objAppointments.IncludeRecurrences = True
objAppointments.Sort "[Start]", False ' Bug: use False/descending see
tdalon / MyScript.ahk
Created Oct 10, 2016
AutoHotkey Script: Open in Explorer with Notepad++, Keep Window always on top
View MyScript.ahk
; AutoExecute Section must be on the top of the script
SetWorkingDir %A_ScriptDir%
GroupAdd, Explore, ahk_class CabinetWClass ; Add a class to the group
GroupAdd, Explore, ahk_class ExploreWClass ; Add a other class to the group
; Always on Top CTRL+SPACE on current window
^SPACE:: Winset, Alwaysontop, , A
tdalon / DeleteEmptyParagraphs.bas
Created Sep 30, 2016
MS Office Word VBA Macros to delete empty paragraphs
View DeleteEmptyParagraphs.bas
Sub DeleteEmptyParagraphs()
Dim oPara As Word.Paragraph
For Each oPara In ActiveDocument.Paragraphs
If Len(oPara.Range) = 1 Then oPara.Range.Delete
End Sub
Sub DeleteEmptyParagraphsWithSpaces()
Dim oPara As Word.Paragraph
Dim var
tdalon / UpdateAllFields.bas
Created Sep 30, 2016
Update All Fields Macro for MS Office Word
View UpdateAllFields.bas
Sub UpdateAllFields()
' UpdateAllFields Macro
Dim oStory As Range
Dim oField As Field
For Each oStory In ActiveDocument.StoryRanges
For Each oField In oStory.Fields
tdalon / myquestdlg.m
Created Sep 28, 2016
MATLAB Modified questdlg to solve bug
View myquestdlg.m
function ButtonName=myquestdlg(Question,Title,Btn1,Btn2,Btn3,Default)
%MYQUESTDLG Question dialog box. Same as QUESTDLG plus solves the issue that if user press ENTER
% it will return the Default Button and not the selected one.
% See
% Moreover the dialog window is now properly centered in the middle of the screen.
% ButtonName=myquestdlg(Question,Title,Btn1,Btn2,Btn3,Default)
% ButtonName (char) is empty if User ESC the dialog.
tdalon / TextBox_Search_KeyDown.bas
Last active Sep 27, 2016
PowerPoint VBA TextBox KeyDown Callback
View TextBox_Search_KeyDown.bas
Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)
' References:
' Hidden Search TextBox
Dim osld As Slide
Dim oshp As Shape
Dim sTextToFind As String
If KeyCode <> 13 Then 'ENTER PRESSED
View plot_depfun.m
function [opt, callstr] = plot_depfun(foo,varargin)
% PLOT_DEPFUN plots a call graph tree of the function dependencies
% plot_depfun(foo,varargin)
% Ignores MATLAB function in matlabroot and any function names given in varargin.
% Uses current file in MATLAB Editor as default if no argument is passed or first argument is empty.
% See also depfun, mydepfun, plot_subfun (file exchange ID 46070)
tdalon / UpdateAllFieldsTOCWithoutTracking.bas
Last active Sep 30, 2016
MS Office Word VBA Macro to update all fields including in header and footer also update Table of Contents. Tracking Changes is disabled during the update.
View UpdateAllFieldsTOCWithoutTracking.bas
Sub UpdateAllFieldsTOCWithoutTracking()
' Update All Fields and TOC without Tracking Changes for it:
' References:
' or
Dim oStory As Range
Dim isChangesTracked As Boolean
tdalon / EditorGetFile.m
Last active Oct 10, 2016
Get current file opened in MATLAB Editor
View EditorGetFile.m
function file=EditorGetFile
% EditorGetFile get current file opened in Editor
% file=EditorGetFile
% file (char): fullpath
edhandle = com.mathworks.mlservices.MLEditorServices.getEditorApplication;
file = edhandle.getActiveEditor.getDocument.getFilename;
tdalon / MoveSectionsSelectedBySlides.bas
Last active Sep 22, 2016
PowerPoint VBA: Move sections selected by slides
View MoveSectionsSelectedBySlides.bas
Sub MoveSelectedSections()
' Slides are copied ready to be pasted
Dim lngNewPosition As Long
'Debug.Print ""
'Debug.Print "###Move Sections..."
lngNewPosition = InputBox("Enter a destination section index:")
lngNewPosition = CInt(lngNewPosition) ' Convert String to Int
Call MoveSectionsSelectedBySlides(ActivePresentation, lngNewPosition)
End Sub
You can’t perform that action at this time.