E-Mail in Outlook über Visual Basic mit Hilfe von AdobePDFMakerforOffice erstellen

Ich möchte gerne aus Visual Basic eine E-Mail aus Outlook als PDF abspeichern, wobei ich auch gerne die Anhänge mit im PDF abspeichern möchte. Dazu möchte ich das Addin in Outlook über Visual Basic verwenden.
Ich verwende derzeit VisualBasix Express und Adobe Acrobat XI Version 11.0.4.
Ich habe aufgrund von Quelltexten im Internet nachfolgenden Code erstellt, wobei ich das Objekt bzw. das Addin in Outlook das "AdobePDFMakerforOffice" anscheind nicht finden bzw. zuordnen kann.
Von Visual Basic wurde folgende Fehlermeldung angezeigt bei der markierten "-------->>" Zeile angezeigt:
"Zusätzliche Informationen: Das COM-Objekt des Typs "System.__ComObject" kann nicht in den Schnittstellentyp "AdobePDFMakerForOffice.PDFMaker" umgewandelt werden. Dieser Vorgang konnte nicht durchgeführt werden, da der QueryInterface-Aufruf an die COM-Komponente für die Schnittstelle mit der IID "{1FE6F30F-4AA0-4EB5-A61C-00C14761EC3E}" aufgrund des folgenden Fehlers nicht durchgeführt werden konnte: Schnittstelle nicht unterstützt (Ausnahme von HRESULT: 0x80004002 (E_NOINTERFACE))."
Es gibt wohl verschiedene Möglichkeiten das Objekt zu übernehmen, aber ich bekomme immer diese Fehlermeldung. Die Meldungen zwischendurch habe ich nur zur Bestätigung, dass Outlook bzw. das AdobePDFForOffice gefunden w bzw. connectet ist hinzugefügt.
Weiß hier jemand Rat ?
Der Code lautet:
Imports System.Diagnostics
Imports System.Linq
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports Microsoft.Office.Interop
Imports AdobePDFMakerForOffice
Private Sub BtnEmailOutlookPdf_Click(sender As Object, e As EventArgs) Handles BtnEmailOutlookPdf.Click
        Dim appAdobe As AdobePDFMakerForOffice.PDFMaker
        Dim appsettings As AdobePDFMakerForOffice.ISettings
        Dim Result As Boolean = EnumWindows(Callback, IntPtr.Zero)
        Dim ObjOl As Object
        Dim myItem As Outlook.Inspector
        Dim SpeichernameMSG, SpeichernamePDF As String
        Dim a
        Dim IndX As Int16
        Dim objInterOL As Microsoft.Office.Interop.Outlook.Application
        Dim objSelection As Microsoft.Office.Interop.Outlook.Selection
        Dim objItems As Microsoft.Office.Interop.Outlook.Items
        Dim objMailItem As Microsoft.Office.Interop.Outlook.MailItem
        ' Outlook suche und Objekt übernehmen
        If Process.GetProcessesByName("OUTLOOK").Count() > 0 Then
            ' If so, use the GetActiveObject method to obtain the process and cast it to an Application object.
            objInterOL = DirectCast(Marshal.GetActiveObject("Outlook.Application"), Outlook.Application)
            'MsgBox("Outlook-Objekt übergeben: Erfolg")
        Else
            MsgBox("Outlook ist nicht geöffnet, bitte Outlook starten")
        End If
        'Acrobat Objekt in Outlook suchen
        With objInterOL
            Do
                IndX = IndX + 1
                If IndX > .COMAddIns.Count Then Exit Do
            Loop Until .COMAddIns(IndX).Description = "Acrobat PDFMaker Office COM Addin"
            If IndX > .COMAddIns.Count Then
                MsgBox("Unable to locate Acrobat PDFMaker COM Add-In for Microsoft Office." & vbCrLf & "Please contact an MIS associate for assistance", vbCritical, "Cannot Export PDF")
            Else
                'MsgBox("My ProgID is " & .COMAddIns(1).ProgID & " and my GUID is " & .COMAddIns(1).Guid)
                If .COMAddIns(IndX).Connect Then
                    MsgBox("The add-in is connected.")
                Else
                    MsgBox("The add-in is not connected.")
                End If
---->>>>       appAdobe = .COMAddIns(IndX).object                       <<---------------------
                MsgBox("appAdobe zugewiesen !")
            End If
        End With
        SpeichernamePDF = "Test.PDF"
        appAdobe.GetCurrentConversationSettings(appsettings)
        With appsettings
            .IsConversionSilent = True
            .IsAutomation = True
            .ShouldShowProgressDialog = True
            .AddTags = False
            .ConvertComments = True
            .AddBookmarks = False
            .AddLinks = False
            .OutputPDFFileName = SpeichernamePDF
            .ViewPDFFile = True
            .AttachSourceFile = False
        End With
        appAdobe.CreatePDFEx(appsettings, 0)
    End Sub

I don't think the Adobe Reader forum is the right place to discuss such an issue.  Try
http://forums.adobe.com/community/acrobat/acrobat_sdk (in English, if possible)
http://forums.adobe.com/community/international_forums/deutsche (deutsches Forum)

Similar Messages

  • Mit Hilfe von Blachbary ins Internet gehen, geht das??Wie??

    Kann man mit Hilfe von Blackbarry ins Internet gehen???

    Google tramslate:
    Are using BlackBerry Internet, does it work? How?
    Can you go with the help of the Internet Black Barry?
    If the Blackberry can act like a wifi hotspot and share it internet connection, then an iPod can connect to the iPod like a it connects to any other normal wifi hotspot/router.

  • E-Mail in Office 2010 mit Hilfe von Visual Basic speichern bzw. generieren

    Sehr geehrte Damen und Herren,
    wie bzw. mit welchem Code kann ich unter  "AdobePDFMakerForOffice" unter Visual Basic eine E-Mail als PDF einschl. des Anhang abspeichern bzw. generieren ?
    Interessant ist dann noch die Angabe eines individuellen Dateinamen, welche sich aus Daten der E-Mail zusammen setzt. Haben Sie hier einen Beispiel-Code ?
    Mit freundlichen Grüßen
    D. Wagner

    Darf ich vorschlagen, dass Sie einen Übersetzer, wie Google verwenden, da ich jetzt mache, oder senden Sie Ihre Frage im Forum in Deutsch?
    http://forums.adobe.com/community/international_forums/deutsche

  • Auslesen der 16 Analogkänale der Multi-IO Karte NI PCI-6036E mit Hilfe Visual Basic

    Guten Tag,
    Ich bin dabei ein Visual Basic Programm zu schreiben, welches bei der Multi-IO Karte "NI PCI-6036E" die Analogkanäle einlesen soll. Ab den Kanal ACH 8 bekomme ich immer eine Fehlermeldung:
    "Laufzeitfehler 10007
    Reading Data
    A channel, port, or counter is out of range for the device type or device configuration;…".
    Ich kann also nur die ersten acht von den 16 Analogkanäle einlesen. Als Vorlage habe ich mir das von NI mitgelieferte Beispielprogramm "AIAOPoint" genommen. Welches sich in den Ordner "..\Programme\National Instruments\NI-DAQ\Examples\Visual Basic" installiert hat. Bei diesem Programm liegt der gleiche Fehler vor.
    Liegt es daran, dass ich eine Freewareversion von den Visual Basic Komponenten benutze? Wenn ja, ab welcher Version wäre mir geholfen und wo bekomme ich sie her? Oder muss ich unter VB noch einige Eigenschaften bei der Komponente "CWAIPoint" einstellen um die vollen 16 Kanäle auszulesen zu können?
    Mit freunlichem Gruß
    Dirk Malczan
    P.S. ich würde mich auch über Quellcode freuen ;-)

    Das Problem wird durch den Messmodus verursacht. Sie messen differentiell. In diesem Messmodus werden immer zwei Eingangskanal zur Messung eines Eingangssignals genutzt (0 und 8, 1 und 9, usw.), so dass insgesamt nur 8 Eingangskanäle zur Verfügung stehen. Der Vorteil dieses Messmodus ist die erhöhte Störsicherheit.
    Wollen Sie alle 16 Kanäle nutzen, müssen Sie entweder Referenced Single Ended (massebezogen) oder Non Referenced Single Ended messen. Diese Einstellung können Sie z. B. im MAX vornehmen.
    Mit freundlichen Grüßen,
    Jochen Klier
    National Instruments Germany

  • AVDocSaveOptimized mit Visual Basic 2012

    Ich habe Probleme mit genannter Funktion.  Ich habe schon alle möglichen Acobat-Verweise eingestellt, aber im Visual-Basic-Objektkatalog sind die Begriffe AVDocSaveOptimized und PDFOptParams nicht zu finden.
    Dim pdDoc As Acrobat.CAcroPDDoc = CType(CreateObject("AcroExch.PDDoc"), Acrobat.CAcroPDDoc)
    Dim PdfParameter As ???.PDFOptParams (?????)
    pdDoc.AVDocSaveOptimized(avDoc, PdfParameter)
    1. In Visual Basic ist nach Eingabe von pdDoc. die Funktion AVDocSaveOptimized nicht im Kontextmenü verfügbar. Allerdings ist auch keine Unterstreichung als Fehler vorhanden. Welcher Verweis ist notwendig, damit auch beim Überstreichen mit der Maus die Funktion mit Parametern angezeigt wird?
    2. PdfParameter ist eine bestimmte Structure. Muss diese im Modul definiert werden oder ist diese im Acrobat-Verweis enthalten?
    Wie muss die Definition von PdfParameter in Visual Basic aussehen (Zeile 2)?
    Es wäre schön, wenn mir jemand weiterhelfen könnte.

    The Acrobat SDK has different parts: JavaScript, Interapplication
    Communication (which is what you are using), and the plug-in interface. You
    cannot mix and match functionality across these different APIs. What you
    are referring to is part of the plug-in interface (hence the sample code in
    C - plug-ins are written in C/C++). You need to limit your search for API
    functions to the IAC interface (or the JavaScript interface if you want to
    to use the JSObject property of your PDDoc object).
    And now in German:
    Das Acrobat SDK hat verschiedene Teile: JavaScript, Interapplication
    Communication (das ist, was Du verwendest), und das Plug-in API. Du  kannst
    diese unterschiedlichen APIs nicht mischen -  die Funktion zum speichern
    optimierter PDF Dateien ist Teil des Plug-in APIs, deswegen gibt's da auch
    nur die Beispiele in C: Plug-ins werden in C/C++ geschrieben. Du musst
    Deine Suche nach Funktionen im IAC API beschränken (es ist auch möglich,
    JavaScript Funktionalität mittels des JSObject Objekts zu verwenden).
    Karl Heinz Kremer
    PDF Acrobatics Without a Net
    PDF Software Development, Training and More...
    [email protected]
    http://www.khkonsulting.com
    2014-10-17 9:54 GMT-04:00 Aladin99 <[email protected]>:
        AVDocSaveOptimized mit Visual Basic 2012  created by Aladin99
    <https://forums.adobe.com/people/Aladin99> in Acrobat SDK - View the
    full discussion <https://forums.adobe.com/message/6839914#6839914>

  • Attachments (such as pdf) in a mail merge Outlook 2010

    Along with the problem of having the mail merges sent from the wrong email account, I also need to attach a PDF of a brochure for the recipient's printing.  I don't see a way to do this.  Can someone help?  I did a search and it mentions a
    Visual Basic way to do this but I don't know the first thing about usng Visual Basic.  I am willing to learn if that is the only way these issues can be overcome.
    Thanks.

    OK, well it looks like I have answered this question myself.  It may not be the easiest or the most elegant solution, but my Googling came up with this
    http://omma.sourceforge.net/.  It actually works rather nicely, but you have to set Outlook to work Offline first and then do the full mail merge.  Once the completed and merged emails are in the Outlook
    Outbox, you run the script and it pulls the selected attachment and adds it to the emails one at a time.  It takes several minutes to complete, but it works.
    If anyone else has a more efficient solution, please feel free to chime in.  I DO still need help with the selection of the outgoing email account, so if you have any solution for that, please let me know.
    Thanks.

  • Can't send or receive mail from Outlook

    just purchased a wireless router and hooked up recently. Can access the internet & outlook express but can't get my mail from outlook which is my main email account. Message says can't find exchange server. I can access Outlook from my laptop wirelessly at work but not at home.
    Any suggestions?

    checked the ip address of the computer when its connected to the router using the command promt.(example.....ip address: 192.168.1.100; Default Gateway:192.168.1.1).
    Open an internet browser (ie, mozilla, netscape,etc.). Type at the address bar the default gateway (192.168.1.1). and you will see a username and password promt for your router. Leave the username blank and use admin for your password, if it doesn't work use the password you setup the router to..
    Once you see the setup page.... you'll be at basic setup sub tab under setup. Look for MTU. Set it to MANUAL and LOWER IT TO 1300.  Save the settings. Check your outlook if its working....If its Does't work do this
    Go to Applications and Gaming tab.
    Look for a port triggering sub tab. type it this way
    Application NameTrigger Port RangeIncoming Port Range
    application       triggered range     forwarded range
    E-mai                 l25 ~ 25                   113 ~ 113
    forwarded range is equevalent to incoming port rage...
    hope this will solve your concern.... 

  • How to install visual basic 6.0 to windows 8.1

    plz help I want setup vb6.0 into win8.1
    I lovw it vb6.0 and also win8.1

    Hello,
    VB 6 is no longer supported by Microsoft. I’d suggest asking in one of the following third-party forums which support Visual Basic 6.
    VB forums
    VB City
    For further information, see:
    Where to post your VB 6 questions
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Create Hyperlink when sending mail via Outlook

    Hi all,
    I want to mail a hyperlink from within function module via outlook. Creating the hyperlink and starting function <new mail> in outlook works just fine. But when the document (word, pdf, etc.) contains blanks, the hyperlink gets interrupted.
    For example:
    h:\temp\word1.doc (this will work just fine).
    h:\temp\word 1.doc (error when displaying hyperlink in body of new mail).
    I know that sometimes on the internet blanks are displayed as %20. But how to insert this in an ABAP statement using CONCATENATE?
    Best regards,
    Micky.

    Hi Micky,
    Try using replace command... to replace SPACE with %20
    Regards,
    Raj
    See the example below:
    REPLACE
    Basic form
    REPLACE f WITH g INTO h.
    Addition
    ... LENGTH len (length specification for field f )
    Effect
    Replaces the first occurrence of the contents of field f in field h with the contents of field g . All fields are handled in their defined length; this means that closing blanks are not ignored.
    The return code value indicates whether the string f was found in h and replaced by g :
    SY-SUBRC = 0 String replaced.
    SY_SUBRC = 4 String not replaced.
    Example
    DATA FIELD(10).
    MOVE 'ABCB' TO FIELD.
    REPLACE 'B' WITH 'string' INTO FIELD.
    returns:
    FIELD = 'AstringCB', SY-SUBRC = 0

  • Flags in Mail vs Outlook Flags

    With the new Mail in Lion, I can flag my mail to be followed up, however there is no tick like in outlook to tick off a mail once it has been delt with. You can highlight mail that has been read or not, but i would still like to see a tick that i dont go back to the same old mail and read it again. Is there a solution for this?

    n the support document at the link below, overstuffing is discussed, and you can assume the 2 GB limit applies equally to Leopard and Mail 3.x.
    http://docs.info.apple.com/article.html?artnum=25812
    The limit of 2 GB applies only to each mailbox, and not overall. In Mail, a mailbox is the basic level of folder, whether a standard mailbox such as Inbox, or one you create for archival purposes. My Mail folder and all mailboxes exceed 8 GB on both a Mac running Leopard and another Mac running Tiger - no issues on either.
    Ernie

  • How can a Visual Basic Application be used to read a Netscape LDAP server?

    I would Like to know if Visual Basic (ON AN NT WORKSTATION) can be used to access a Netscape LDAP Server (ON UNIX). And If so, will any API calls be necessary? Is there any documentation on using Visual Basic with LDAP?

    Hi Ryan,
    yes you can use VB with the nsldap32v30.dll or nsldap32v30.dll. You can get this from the iplanet page . The dll is inside the LDAP C SDK. Then, there's a 3 or 4 year old vb sdk with the declarations of the LDAP functions; but this seems not to be available in the web.
    Please send me a mail, I'll send you the doc and a sample vb prog.
    remove the nospam.
    [email protected]

  • Import apple mails to outlook 2011

    Having trouble in moving my mails to outlook 2011 for mac.
    Gone through a lot of forums and forum sites but none provided the right solution.
    Tried the the IMAP procedure but it takes long time. Don't have that much time to waste.
    Have got around 10000 mails and outlook impoet fundtion doesn't seem to work.
    Need solutions that can quickly solve this problem of mine.
    Waiting for useful help. Thank You

    You can find a queue of solutions if you type the heading of your query in a suitable search engine like google or yahoo.
    Basically you will need to convert the apple mail emails that are stored in .emlx format to .olm format that will require a converter tool.
    here is one that I think might be helpful: http://mailexporterpro.com/

  • Visual Basic 6 application moved to new server - activex component can't create object

    I have to move a VB6 application that was running on a Windows 2003 machine to a new Windows 2008 machine.
    This EXE application was using classes defined in a DLL using the Createobject method.
    Now, after the class instance has been created by Createobject, when the program calls the methods error 429 "activex component can't create object" is issued.
    The DLL has been registered on the new server using the command :
    regsvr32 c:\folderx\dllname.dll
    Which is the right forum to get help on this ?
    Thanks.

    Hello,
    As Dave says, VB 6 is no longer supported by Microsoft.
    I’d suggest asking in one of the following third-party forums which support Visual Basic 6.
    VB forums
    VB City
    For further information, see:
    Where to post your VB 6 questions
    Karl
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book:
    Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

  • Mail vs Outlook

    I have been using Outlook 2011 and want to start using Mail, i am running 10.8.5, when i opened mail, it tries to add 2000  emails, also Outlook reloads old emails, how do i stop this?  What do i need to do to move from Outlook to mail?  I don't need all the old emails, just the ones i have kept in outlook and the new ones that arrive.

    n the support document at the link below, overstuffing is discussed, and you can assume the 2 GB limit applies equally to Leopard and Mail 3.x.
    http://docs.info.apple.com/article.html?artnum=25812
    The limit of 2 GB applies only to each mailbox, and not overall. In Mail, a mailbox is the basic level of folder, whether a standard mailbox such as Inbox, or one you create for archival purposes. My Mail folder and all mailboxes exceed 8 GB on both a Mac running Leopard and another Mac running Tiger - no issues on either.
    Ernie

  • Workflow - Sending mail to Outlook

    Hi
    I am new to workflow and have some basic questions. I am working on 470 with WAS 620. I can currently send e-mail to Outlook without forwarding from SAP Inbox with the help of Send Mail functionality. In this case I can read outlook e-mail id of the user and send a mail with Send Mail functionality of Workflow.
    My SCOT transaction is configured to send e-mails outside SAP.
    Question:
    1. I was told that we can use agent assignment based on the Org structure and configure sending of e-mails based on a condition. Is this true?
    2. If 1 is true then can we use agent assignment and send e-mails to Outlook inbox directly i.e. with out forwarding mails from SAP Inbox to Outlook inbox.
    I have tried to find some solution.
    Based on the OSS Note: 627397.
    With WAS 620: It is no longer necessary to specify a forward address in the Business Workplace user settings in order to receive notifications.
    Instead user master record (transaction SU01) is always used to determine the e-mail addresses.
    Note with WAS 640: E-mail address can be read from the PD org structure (info type 1205) instead of user's master record (transaction SU01).
    Does that mean that I can still use agent assignment? If yes what is the difference the note is talking about between WAS 620 and 640. Do I need to do something special to read this mater record the note is talking about?
    Thanks for your replies in advance.
    Nani

    Thanks Shashank.
    You have mentioned that we can read user profiles and send e-mails with help of agent assignment. But, you have also mentioned that this is the case where HR is not implemented. So did you mean that where there is no Org Structure?
    In my case, we have HR implemented and we have an Org Structure. In the PO/PR release strategy we use Org Structure and Position to decide whom to send E-mail.
    Now what is it that I need to do differently to make sure that the E-mail is sent to Outlook directly not via SAP Inbox.
    Nani

Maybe you are looking for

  • Update Date in OITM table

    Hi Experts I would like to run a query on OITM ti show me all the items which have been updated on todays date. I need to run it from SQL Server Management Studio i have tried the WHEN updatedate = getdate() and although the query runs succesfully I

  • JavaScript error. Need help!

    Hi, Since 2 weeks I encountered Javascript errors when starting Dreamweaver CS6. 1st one - While Executing onLoad in BusinessCatalyst.htm, the following JavaScript error(s) occured: In file "BusinessCatalyst": bcinit is not defined. 2nd one - The fol

  • Flash CC 2014 Update broke streaming audio in timeline

    Is it just me? it used to be that when you started a streaming audio file in frame 1 and when to frame 400 and hit enter to start preview, it would start the audio from frame 400. now it starts over from frame 0. this make animation cueing especially

  • Sales order user exit to make item quantity zero

    Hello friends , Here is my requirement . When I am creating or changing the sales order I need to check wether the material is discontinued or not and if discontinued and if discontinued I need to make the quantity as zero . Can you please hekp me ou

  • Authorization for va01 and va02

    Hi all, I have a requirement to add an authorization for certain fields (not for editing) in va01 and va02. If i create an authorization object for the same, is it possible to integrate auth object to roles and What will be the fields of auth object