Working on Macros for PowerPoint

Hi I have few questions which i have asked in attached PPT file. Let me know if this is okay to put my request in this way...
Amitesh SinhaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Eric WoodfordSoftware Systems Specialist 3Commented:
Just a heads up, macros can be useful in Office documents, but many Anti-virus solutions will block these attachments as viruses. So emailing them will often cause them to be deleted or not delivered at all.
Jamie GarrochPowerPoint Consultant & DeveloperCommented:
@Eric : Does that happen even if the VBA project is digitally signed with an AuthentiCode certificate issued by a root-CA authority which is intended to identify the publisher as a legitimate entity?

@Amitech : I know that EE [still] does not permit the upload of macro-enabled PowerPoint files, even though they allow macro-enabled Excel files! So the best workaround I have is to simply add the .zip extension on the end of your file name e.g. myFile.pptm becomes and then you can upload it to this question.
Eric WoodfordSoftware Systems Specialist 3Commented:
VBA is still VB. Outlook blocks anything that can be sent that has is an executable attachment. HTA, Excel macros, etc. There was a virus not that long ago that included MS Word document with an embeded macro that downloaded malware to the client's PC.

For a list of blocked attachment types see
Introducing Cloud Class® training courses

Tech changes fast. You can learn faster. That’s why we’re bringing professional training courses to Experts Exchange. With a subscription, you can access all the Cloud Class® courses to expand your education, prep for certifications, and get top-notch instructions.

Jamie GarrochPowerPoint Consultant & DeveloperCommented:
Interesting link Eric. For two reasons. (a) because none of the Office macro-enabled formats are included and (b) the paragraph below, which stunned me. Why implement a security feature and then educate users on how to work around it?!

Rename the file  
You can rename the file (or request that the sender rename the file) to use an extension that Outlook doesn't block. For example, you can rename file.exe to file.docx. Once the renamed file is sent (or received), save it and rename it with the original extension using the following steps.
Amitesh SinhaAuthor Commented:
I edited my question title and made attachment in Zip format
Jamie GarrochPowerPoint Consultant & DeveloperCommented:
Did you click the Attach File button followed by the Embed button when you posted your last comment because I still can't see any file. I have uploaded a PowerPoint file to this comment to show you what it should look like.
Amitesh SinhaAuthor Commented:
Jamie, sorry for missing the attachment last time... now i have attached PDF file... let me know if it works for you..!!
Jamie GarrochPowerPoint Consultant & DeveloperCommented:
Try this Amitesh:

' ===============================================================
' PowerPoint VBA Module
' Purpose : Set the specified properties for all text shapes this
'           presentation.
' Author : YOUpresent,
' Answer to ExpertsExchange question 29083269
' ===============================================================

Option Explicit

' Custom enumeration for the properties to be set
Public Enum ypProperties
  ypPropertyMargins = 1
  ypPropertyShadow = 2
  ypPropertyBullet = 4
End Enum

' Macro 1 : Presets margins to 0.05" for all textboxes in this presentation
Public Sub SetMargins()
  SetTextboxProperties ypPropertyMargins
End Sub

' Macro 2 : Turns shadow off for all textboxes in this presentation
Public Sub SetShadow()
  SetTextboxProperties ypPropertyShadow
End Sub

' Macro 3 : Presets bullets for all textboxes in this presentation
Public Sub SetBullet()
  SetTextboxProperties ypPropertyBullet
End Sub

' Macro 4 : Combines all three macros above
Public Sub SetAll()
  SetTextboxProperties ypPropertyMargins + ypPropertyShadow + ypPropertyBullet
End Sub

' ===============================================================
' Purpose : Set all specified for all text shapes in a presentation
' Inputs : PropertyList - bitwise list of properties to set
' ===============================================================
Private Sub SetTextboxProperties(PropertyList As ypProperties)
  Dim oSld As Slide
  Dim oShp As Shape
  Dim oGrpItem As Shape
  For Each oSld In ActivePresentation.Slides
    For Each oShp In oSld.Shapes
      If oShp.Type = msoGroup Then
        For Each oGrpItem In oShp.GroupItems
          If oGrpItem.HasTextFrame Then SetProperty oGrpItem, PropertyList
        If oShp.HasTextFrame Then SetProperty oShp, PropertyList
      End If
End Sub

' ===============================================================
' Supporting function for SetTextboxProperties
' Purpose : Sets specified properties for the referenced shape
' Inputs : oShp - PowerPoint shape containing a TextFrame
'          PropertyList - bitwise list of properties to set
' Return : True if successful, False if error
' ===============================================================
Private Function SetProperty(oShp As Shape, PropertyList As ypProperties) As Boolean
  On Error Resume Next
  Select Case oShp.Type
    Case msoTextBox, msoAutoShape
      If (PropertyList And ypPropertyMargins) = ypPropertyMargins Then
        With oShp.TextFrame
          .MarginBottom = 3.6
          .MarginLeft = 3.6
          .MarginRight = 3.6
          .MarginTop = 3.6
        End With
      End If
      If (PropertyList And ypPropertyShadow) = ypPropertyShadow Then
        oShp.Shadow.Visible = msoFalse
      End If
      If (PropertyList And ypPropertyBullet) = ypPropertyBullet Then
        With oShp.TextFrame2.TextRange.ParagraphFormat
          With .Bullet
            .Visible = msoTrue
            .Character = Chr(108)
            .Type = msoBulletUnnumbered
            With .Font
              .Name = "Windings"
              .Size = 0.7 * .Parent.Parent.Parent.Font.Size
              .Fill.ForeColor.RGB = RGB(0, 90, 140)
            End With
          End With
          .IndentLevel = 1
          .FirstLineIndent = -13.68
          .LeftIndent = 13.68
          .HangingPunctuation = msoTrue
        End With
      End If
  End Select
  If Err = 0 Then SetProperty = True
  On Error GoTo 0
End Function

Open in new window

Amitesh SinhaAuthor Commented:
Thanks Jamie for giving the solutions. macro for Shadow great, it really works, thanks. somehow Bullet and Margin are not working for me. will try to fix at my end.
Thanks once again...
Jamie GarrochPowerPoint Consultant & DeveloperCommented:
I tested on my side and it worked in all 3 cases.,could you share ne slide with an example of content that is not working and I will check so that this question can be closed?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft PowerPoint

From novice to tech pro — start learning today.