Results 1 to 9 of 9
  1. #1
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419

    PowerPoint has stop working - unhandled win32 exception in POWERPNT.EXE[5926]

    I programmatically copies tables from excel to power point. I hide excel and pptx files while doing it and I get this error at the end of it. However if I set those files as visible this error doesn’t exist. Does anyone have any solution in solving this or experienced it ?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Post your code.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    In one sub I open xlsx file from directory.
    Dim xl as excel.application
    Set xl = createobject(“excel.application”)
    Set wb = xl.workbooks.open(path + xxl, false, false)

    In another sub
    I open a pptx from a directory.
    ppt = “PowerPoint.pptx”
    Dim sl as powerpoint.slide
    Dim pres as powerpoint.presentation
    Set pap = createobject(“powerpoint.application”)
    Set pres = pap.presentations.open(pth + ppt, with Windows:=msofalse)
    “Copy from table to power point
    Pres.saveas pth & name.pptx
    Pres.close
    Pap.quit
    Set sld = nothing
    Set pres = nothing
    Set pap = nothing

    Sorry that I didn’t put it in the code format as I am on my phone. I used this before and never have this error until now.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    If code used to work then what has changed?

    Where are xxl and path and pth declared and set? Don't see wb and pap declared.

    Use & instead of + for string concatenation.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    The biggest change that I know and remember from it is that I added a sql statement in the report sub. This sql statement that when the loop goes to each slide it runs a sql statement and put the numbers for the slide. In the others ones without the issues I never did sql statement in the report sub.

    Anyway as I was looking and fiddling with it, I noticed that after I change from withwindow:=msofalse to just msoFalse the issue is resolved. Many of the other times I have it as the first way I never have this issue. I think is the first time I have this. I wonder why is the error though. However I am glad is resolved and hope it never comes back.

    Thanks for sharing the string concatenation advise. I’ll use it.

  6. #6
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    But is not consistent, because I have msoFalse instead of withwindow:=msoFalse sometimes PowerPoint becomes visible and sometimes not. However if I have withwindow:=msoFalse the error pops up.
    I noticed when I change the xlsx, Access and PowerPoint file name the PowerPoint file becomes visible under msoFalse.

    Know how I can fix it or what the issue is ?

  7. #7
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    I use
    public pap as powerpoint.application
    Public xl as excel.application
    Public wb as excel.workbook

    In another sub
    Dim xl as excel.application
    Set x1 = createobject (“Excel.Application”)
    Set wb = xl.woekbooks.open(file, false, false)

    In another sub
    Set pap = createobject (“powerpoint”)
    Set pres = pap.presentations.open(filename,,, msoFalse)

  8. #8
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Thread is marked solved - is it? Want to share the solution?

    The code in post 7 shows errors which I hope are just typos in post: Set x1 should be Set xl and woekbooks should be Workbooks.

    I should have said: normally use & for string concatenation. If there is possibility the variable can be Null, & and + will produce different result. Concatenation with & will return the string component, concatenation with + would return Null. Also, trying to + alpha with numeric will error.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  9. #9
    johnseito is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Aug 2013
    Posts
    419
    I think in my message I said is solved so it tack it as solved. But is inconsistent sometimes I don’t have error and msoFalse works and sometimes it doesn’t and PowerPoint becomes visible so is not solve. Thanks I’ll remember the & for string concatenation. I can’t figure out why hiding the PowerPoint with withwindow=: msoFalse it gets the error message.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Calculations sometimes stop working
    By rhodesengr in forum Access
    Replies: 7
    Last Post: 08-11-2014, 01:02 PM
  2. Buttons STOP working !!
    By THE STUDENT in forum Forms
    Replies: 3
    Last Post: 06-10-2013, 08:11 PM
  3. Replies: 0
    Last Post: 07-19-2012, 02:25 PM
  4. Unhandled win32 exception occurred in MSACCESS.EXE [6648]
    By AccessCorruption in forum Access
    Replies: 4
    Last Post: 11-23-2011, 05:17 PM
  5. An Unhandled win32 exception occurred in MSAccess.exe
    By Alice Liu in forum Import/Export Data
    Replies: 2
    Last Post: 12-08-2010, 01:40 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums