Consulting

Results 1 to 5 of 5

Thread: Coding works for WORD but not POWERPOINT, how should i modify it?

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    VBAX Mentor
    Joined
    Nov 2022
    Location
    The Great Land
    Posts
    419
    Location
    Note for future: post code between CODE tags to retain indentation and readability.

    1. I don't think InlineShapes is valid in PP. Use Shapes. I doubt the exact same code can be used for both Word and PP.

    2. Don't see why not. Example of adding image:
    With .Shapes.AddShape(msoShapeRectangle, 360, 121, 220, 110) 'photo
          .Fill.UserPicture "image path\name"
    End With
    3. Use string manipulation functions to truncate filename: Left(xFile, InStrRev(xFile, ".") - 1).

    4. Try: .ParagraphFormat.Alignment = wdAlignParagraphCenter
    Last edited by Aussiebear; 03-02-2025 at 04:29 AM.
    How to attach file: Reading and Posting Messages (vbaexpress.com), click Go Advanced below post edit window. To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •