Skip to content

Instantly share code, notes, and snippets.

Avatar

Yoshiki Sato xight

  • Tokyo Gakugei University
  • 4-1-1 Nukuikita-machi, Koganei-shi, Tokyo 184-8501 Japan
View GitHub Profile
@xight
xight / ppt-resize-shapes-to-fullsize.bas
Last active Jun 8, 2016
PowerPointで指定した名前のShapeをスライド全体にリサイズするマクロ
View ppt-resize-shapes-to-fullsize.bas
Sub ResizeShapesToFullsize()
Dim w As Integer
Dim h As Integer
w = ActivePresentation.PageSetup.SlideWidth
h = ActivePresentation.PageSetup.SlideHeight
Dim sld As Slide
Dim sh As Shape
targetNameArr = Array("Picture 6", "Content Placeholder 6")
@xight
xight / ppt-centering-shapes.bas
Last active Jun 8, 2016
PowerPointで指定した名前のShapeをセンタリングするマクロ
View ppt-centering-shapes.bas
Sub CenteringShapes()
targetNameArr = Array("Picture 6", "Content Placeholder 6")
Dim sld As Slide
Dim sh As Shape
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
For Each targetName In targetNameArr
If sh.Name = targetName Then
@xight
xight / ppt-send-to-back.bas
Last active Jun 8, 2016
PowerPointで指定した名前のShapeを最背面に移動させるマクロ
View ppt-send-to-back.bas
Sub SendtoBack()
Dim sld As Slide
Dim sh As Shape
targetNameArr = Array("Picture 6", "Content Placeholder 6")
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
For Each targetName In targetNameArr
If sh.Name = targetName Then
@xight
xight / find_merged_cell.bas
Created Jul 1, 2015
find merged cell from worksheets
View find_merged_cell.bas
' usage
' Call("Sheet1", "A1", "Z100")
Sub findMergedCell(strWorkSheet As String, strStartCell As String, strEndCell As String)
Dim cl
Dim msg
Dim rng
rng = strStartCell & ":" & strEndCell
For Each cl In Worksheets(strWorkSheet).Range(rng)
@xight
xight / watermark_pdf_yosemite.patch
Created Apr 1, 2015
Automator Watermark PDF for OS X Yosemite patch
View watermark_pdf_yosemite.patch
*** /System/Library/Automator/Watermark PDF Documents.action/Contents/Resources/tool.py 2014-09-10 07:34:59.000000000 +0900
--- tool.py 2014-11-18 15:38:01.000000000 +0900
***************
*** 26,32 ****
def createImage(imagePath):
image = None
! provider = CGDataProviderCreateWithFilename(imagePath)
if provider:
imageSrc = CGImageSourceCreateWithDataProvider(provider, None)