Results 1 to 4 of 4

Thread: Powerpoint Form - How to generate a GUID in a Powerpoint Form

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,096
    Location
    That works well Paul. I was told it wouldn't work in 64 bit Office but it does. I suspect they had the declaration incorrect!

    As declared it will not run in 2007 or earlier.

    Option Explicit
    #If VBA7 Then
       Declare PtrSafe Function CoCreateGuid Lib "OLE32.DLL" (pGuid As GUID) As LongPtr
    #Else
       Declare Function CoCreateGuid Lib "OLE32.DLL" (pGuid As GUID) As Long
    #End If
    Private Type GUID
       Data1 As Long
       Data2 As Integer
       Data3 As Integer
       Data4(0 To 7) As Byte
    End Type
    Last edited by John Wilson; 08-03-2017 at 03:21 AM.
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Posting Permissions

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