Excel VBA Code crashes PPT Presentation and lead to Error 462

Diskutiere und helfe bei Excel VBA Code crashes PPT Presentation and lead to Error 462 im Bereich Microsoft Office im Windows Info bei einer Lösung; Hallo, you guys are my lost hope. Nobody and nothing was able to help me so far, not google, not Stackoverflow, no other experts. I have a Code,... Dieses Thema im Forum "Microsoft Office" wurde erstellt von Michael Kling, 13. Januar 2019.

  1. Excel VBA Code crashes PPT Presentation and lead to Error 462


    Hallo,

    you guys are my lost hope. Nobody and nothing was able to help me so far, not google, not Stackoverflow, no other experts.

    I have a Code, which starts in Excel and opens a PPT, updates the links, renames the PPT and closes it. The problem: Sometimes (not always) the PPT Presentation crashes and my code stops running, resulting in the following error message: "Error 462 the remote server machine does not exist or is unavailable"




    The PPT seems to crash in different parts of the code but mostly at "Set PP = pptApp.Presentations.Open(pptVorlage)". Sometimes the code works fine for 50 loops, sometimes crashes after the first one.

    Link to the files: https://drive.google.com/open?id=1D3Co_JfGmRsW18DeLFe1QJtApFgS2WDT

    Please help me, it has already cost me days :/

    Kind regards and thanks in advance for your help
    Michael

    Code:


    Option Explicit

    Public myfilename As String





    Sub Saveas_PPT_and_PDF()



    Set ws_company = Tabelle2



    Dim PP As PowerPoint.Presentation

    Dim sh As Variant

    Dim company As String

    Dim strPOTX As String

    Dim strPfad As String

    Dim pptVorlage As String

    Dim newpath As String

    Dim newpathpdf As String

    Dim Cell As Range

    Dim pptApp As Object



    Application.ScreenUpdating = False

    Application.EnableEvents = False



    pptVorlage = "C:\Users\Michael\Desktop\Test PPT\MSO Tester.pptx"



    company = Dropdown.ws_company.Range("C2").Value



    Set pptApp = CreateObject("PowerPoint.Application")



    Dim drop As Range

    Set drop = ws_company.Range(ws_company.Cells(5, 3), ws_company.Cells(Rows.Count, 3).End(xlUp)).SpecialCells(xlCellTypeVisible)



    For Each Cell In drop



    ws_company.Range("C2").Value = Cell.Value





    'Set PP = Nothing

    Set PP = pptApp.Presentations.Open(pptVorlage) 'often I get the error message here, so it must crash before this part, correct?



    newpath = Replace(pptVorlage, "MSO", "" & Cell & "MSO") 'what is this needed here ?





    'Application.Wait (Now + TimeValue("0:00:05"))

    PP.UpdateLinks

    PP.SaveAs newpath



    newpathpdf = Replace(newpath, "pptx", "pdf")



    PP.ExportAsFixedFormat "" & newpathpdf & "", ppFixedFormatTypePDF, ppFixedFormatIntentPrint



    'pptApp.Presentations(newpath).Close

    PP.Close



    Set PP = Nothing

    Next



    'this part below closes PPT application if there are no other presentation object open. If there is at least 1, it leaves it open



    If IsAppRunning("PowerPoint.Application") Then

    If pptApp.Windows.Count = 0 Then



    pptApp.Quit

    End If

    End If

    Set pptApp = Nothing

    Set PP = Nothing

    Call RefreshDataEachHour



    End Sub






    Function IsAppRunning(ByVal sAppName) As Boolean

    Dim oApp As Object

    'On Error Resume Next

    Set oApp = GetObject(, sAppName)

    If Not oApp Is Nothing Then

    Set oApp = Nothing

    IsAppRunning = True

    Else

    IsAppRunning = False

    End If

    End Function




    Public Sub RefreshDataEachHour()



    Application.OnTime Now + TimeValue("00:00:10"), "Saveas_PPT_and_PDF"



    End Sub
     
  2. Peter Doering Win User

    Access stürzt bei Aufruf eines Formulas ab

  3. zuhalschubbe Win User

    Probleme mit PowerPoint

    Hallo Ute, vielen Dank für deine Antwort

    1- Ich werde Audacity aussprobirern bei xp könnte mann die wav Dateien mit diese Audisrecorder kompremieren

    2- Ich könnte aber vor paar Tagen pps Dateien mit Internet Explorer öffnen und bearbeiten genau so wie beim XP. dann auf ein mal ging da nicht mehr.

    Beispiel: du hast eine fertige als Powerpoint Pressepräsentation gespeicherte PPS und möchtest
    in diesen pps etwas ändern zum beispiel die Music oder willst neue Folien hinzufügen.

    Wie machst du das, das diese PPS als PPT geöffnet wird?. Wenn ich ein ganz eine ganz neue PPS machen möchte hast recht kann ich auf app klicken dann geht eine neue Präsentation auf.

    Aber ich möchte eine bestehende schon als Präsentation gespeicherte PPS als PPT öffnen. Wenn ich eine schon gespeicherte Presentation mit PP öffne kann ich mir sie nur ansehen und nicht bearbeiten weil sie als ganz normale als Presentation gespeicherte
    Datei ist.

    das ist das Problem natürlich kann ich jeder schon fertige PPS mit PP öffnen aber nicht bearbeiten.

    Ich mache seit schon 5 Jahren Powerpoint Presentationen. beim XP lief es genau so.

    Also muss ich hier genau so eine fertige Presentation mit internet explorer eröffnen damit ich diese Repräsentation ändern kann. Anders geht leider nicht

    Falls du eine andere Vorschläge hast bitte las mich es wissen

    Vielen dank für die Hilfe
  4. MattesT_DE Win User

    Notizbücher können nicht geteilt werden / Email wird nicht versendet

    Hi,

    das Sharing über den Link geht, ist jedoch zu unsicher für meine Anforderungen.

    Die Fehlermeldung erscheint sobald ich auf die Schaltfläche "Share" gedrückt habe und lautet wie folgt:

    "We're sorry, something went wrong and we can't do this right now. You may want to search for this error code online for a solution."

    Es wird aber kein Error Code angezeigt. Das Ganze ist auch unabhängig von der Emailadresse.

    Danke für euren Support!

    Beste Grüße

    Matthias
  5. Andreas Killer Win User

    sollte man excel 4.0 makros umwandeln?

    Kann oder sollte ich den Programmcode in eine neue Excel-Makrosprache (VBA ?) umwandeln.
    Kann... kommt auf Dich an.

    Sollte... ja, wenn Du es in Zukunft weiter verwenden willst. Es ist angekündigt das VBA soweit erweitert wird das man alle Excel 4.0 Makros mit VBA nachbilden kann. Und dann wird eines Tages der alte Code nicht mehr unterstützt.

    Sprachtechnisch gesehen ist VBA um einiges einfacher als Excel 4.0, allerdings musst Du nun schon umdenken, da es nur noch Objekt-orientierte Sprachen gibt.

    Aber Vokabelprogramm... ich kann mir gar nicht vorstellen was da so umfangreich an dem Code sein soll... beschreib doch mal was Dein Code so macht.

    Andreas.
  6. Andreas Killer Win User

    Exel Fehler Model Mdl_WinApi

  7. User Advert


    Hi,

    willkommen im Windows Forum!
Thema:

Excel VBA Code crashes PPT Presentation and lead to Error 462 - Microsoft Office

Die Seite wird geladen...

Excel VBA Code crashes PPT Presentation and lead to Error 462 - Similar Threads - Excel VBA Code

Forum Datum

Excel VBA Code Mietberechnung

Excel VBA Code Mietberechnung: Hallo zusammen,könnte mir jemand mit einem VBA Code behilflich sein?Ich möchte gerne die grünen Felder als flexible Eingabefelder haben.Und das Ergebnis sollte entsprechend dem Beispiel...
Microsoft Office 18. Januar 2024

Aplication crashes due to : 0xc0000005 Error

Aplication crashes due to : 0xc0000005 Error: Hello, I am having alot of issues lateley with crashes of my applications. It the ShooterGameServer.exe ARK Server. They start normal and crash probably when a player does something that required...
Apps 27. Juni 2023

Error in VBA code in Excel

Error in VBA code in Excel: Good morning,I have a VBA code that was working fine and now it keeps bringing up an error message. Can someone help me here please? Thank you!
Microsoft Office 22. Juni 2023

PowerPoint VBA Code: Export Slides to Single Slide Presentations INCLUDING HIDDEN Slides

PowerPoint VBA Code: Export Slides to Single Slide Presentations INCLUDING HIDDEN Slides: Hello Microsoft Community,I got a macro thanks to John SR Wilson, what works almost fine.The macro export slides from a master file to single slide presentations.For instance I have one master...
Microsoft Office 17. Mai 2023

Excel VBA-Code

Excel VBA-Code: Hallo liebe Community,ich würde gerne den Zelleninhalt aus Zelle "E8" im Tabellenblatt "Januar" als Kommentar/Notiz in das Tabellenblatt "Februar" in der Zelle "E8" übernehmen. Als nächstes soll...
Microsoft Office 27. Mai 2022

Excel 365 VBA Code

Excel 365 VBA Code: Hallo Zusammen, ich bitte um Eure Hilfe. Ich habe einen älteren VBA Code für den Füllstand von Kugelbehältern, siehe unten, der unter Excel 2013 ohne Probleme lief. Seit ich ich Excel aus...
Microsoft Office 17. Februar 2020

Excel VBA Code crashes PPT Presentation and leads to Error 462

Excel VBA Code crashes PPT Presentation and leads to Error 462: Hallo, I have a Code, which starts in Excel and opens a PPT, updates the links, renames the PPT and closes it. The problem: Sometimes (not always) the PPT Presentation crashes and my code stops...
Microsoft Office 13. Januar 2019
Excel VBA Code crashes PPT Presentation and lead to Error 462 solved
  1. Diese Seite verwendet Cookies, um Inhalte zu personalisieren, diese deiner Erfahrung anzupassen und dich nach der Registrierung angemeldet zu halten.
    Auf dieser Website werden Cookies für die Zugriffsanalyse und Anzeigenmessung verwendet.
    Wenn du dich weiterhin auf dieser Seite aufhältst, akzeptierst du unseren Einsatz von Cookies.