UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Outlook 2016 Outgoing Message Attachment, Any Version    
 
   
johan
post May 4 2019, 02:51 AM
Post#1



Posts: 1,023
Joined: 24-April 08
From: Riebeek Kasteel, Western Cape, South Africa


I am using outlook 2016. When I compose a message and attach an attachment I can only see "Attached" but the actual file. I attached a screenshot to the this threat
Office 2016 is updates are up to date.
This post has been edited by johan: May 4 2019, 02:53 AM
Attached File(s)
Attached File  Attachment.pdf ( 130.33K )Number of downloads: 6
Attached File  Attachment.pdf ( 131.8K )Number of downloads: 6
 

--------------------
Johan
Winners don't do different things, they do things different.
Go to the top of the page
 
DanielPineault
post May 4 2019, 06:15 AM
Post#2


UtterAccess VIP
Posts: 6,853
Joined: 30-June 11



Create and attach an attachment, how exactly? If through code, could you post your full code? What type of attachment are you adding to the e-mail exactly?

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
johan
post May 6 2019, 01:26 AM
Post#3



Posts: 1,023
Joined: 24-April 08
From: Riebeek Kasteel, Western Cape, South Africa


Hi Daniel, I don't think it is the code as the attachment file did show previously in outgoing messages but I will attached code

CODE
Private Sub AmendConfir_Click()
'Dim Variable_Note  As String
    Dim stDocName       As String
    Dim MyPath          As String
    Dim MyFileName      As String
    Dim Variable_To     As String
    Dim Variable_CC     As String
    Dim Variable_Subject As String
    Dim Variable_Body   As String
    Dim Signature       As String
    Dim OutApp          As Object
    Dim OutMail         As Object
    Dim OutlookAttach   As outlook.Attachment
    Dim strFileName     As String

    'Check if client's email exsists
    '-------------------------------
    If Nz(Me.Text61, "") = "" Then
    MsgBox "Email address required. Go back to database and enter an email address", vbOKOnly + vbCritical, "Email address Required"
    Me.Text61.SetFocus
    Exit Sub
    End If
    
    'I place the file on a different folder
    '-------------------------------------------------------
     MyPath = "\\JK_Server-PC\Users\JK_Server\My Documents\JKBrokers\Clients\PersonalClients\" & Forms!ClientInformation.LastName & " " & Forms!ClientInformation.Initials & " " & Forms!ClientInformation.Title & "_" & Forms!ClientInformation.ClientNr & "\Amendments\"

    'State the filename.
    '-------------------------------------------------------
    MyFileName = "Amendment" & "" & "nr_" & Me.Amendment_nr & " " & Forms!ClientInformation.LastName & " " & Forms!ClientInformation.Initials & " " & Forms!ClientInformation.Title

    'Let's print and save. Once you see it works, you can change True to False so that the file created is not opened after completion.
    '----------------------------------------------------------------------------------------------------------------------------------
    DoCmd.OpenReport "AmendmentPersonalConfirmation", acViewPreview
    DoCmd.OutputTo acOutputReport, "AmendmentPersonalConfirmation", acFormatPDF, MyPath & MyFileName & ".pdf", False
    
    'Let's close our previewed report
    '--------------------------------
    DoCmd.Close acReport, "AmendmentPersonalConfirmation"

    ' The filepath for the attachment
    '--------------------------------
    If Not IsNull(Me.strHyperlink) Then
    strFileName = Mid$(Me.strHyperlink, InStr(Me.strHyperlink, "#") + 1)
    Else
    strFileName = "Empty"
    End If

    'Set Variables
    '---------------------------
    Variable_To = Me.Text61
    Variable_CC = Me.Text97
    Variable_Subject = "BEVESTIGING/CONFIRMATION #" & Me.Amendment_nr & ": " & Me.Text41 & " Polis/Policy#: " & Me.Text32 & "/" & Me.Text36 & " " & Me.Text35 & " " & Me.Text34
    Variable_Body = "<FONT face=Verdana size=2>Geagte/Dear  " & Me.Text103 & "<BR><BR>"
    Variable_Body = Variable_Body & "U onderstaande opdrag om u polis te wysig is aan u versekeraar gestuur/Your under mentioned instruction to amend your policy has been send to your insurer."
    Variable_Body = Variable_Body & "<hr style= 'color:Black;height:1pt' />"
    Variable_Body = Variable_Body & Me.Amendment
    Variable_Body = Variable_Body & "<hr style= 'color:Black;height:1pt' />"
    Variable_Body = Variable_Body & "<B><U>U ADVISEUR/YOUR ADVISOR:</U></B><BR>" & "Naam/Name: " & Me.Text99 & "<BR>"
    Variable_Body = Variable_Body & "Sel#/Cell#: " & Me.Text101 & "<BR>" & "Epos/Email: " & Me.Text97 & "<BR>"
    Variable_Body = Variable_Body & "<hr style= 'color:Black;height:1pt' />"
    Variable_Body = Variable_Body & "<Center><B>Op datum skedule word spoedig aan u gepos/Updated schedule will be "
    Variable_Body = Variable_Body & "posted to you soon.</B></Center><BR>"
    Variable_Body = Variable_Body & "Groete/Regards<BR>"
                      
    'Set the ATTACHMENT field
    '--------------------------------------------------------------------------------------
    'If Not IsNull(strHyperlink) Then
    'OutlookMail.Attachments.Add (strFileName)
    'End If

    'Set Outlook session with signature
    '-----------------------------------------------
    Set OutApp = CreateObject("Outlook.Application")
    OutApp.Session.Logon
    Set OutMail = OutApp.CreateItem(0)
    On Error Resume Next
    With OutMail                               ' This creates a blank email and captures the users default signature.
        .BodyFormat = 2                        ' 2 = HTML format
        .Display
    End With

    Signature = OutMail.HTMLBody

    With OutMail

        .To = Variable_To
        .CC = Variable_CC
        .BCC = ""
        .Subject = Variable_Subject
        .Attachments.Add (MyPath & MyFileName & ".pdf")
        .Attachments.Add (strFileName)
        .HTMLBody = Variable_Body & Signature
        .Display                               'or use .Send
        .ReadReceiptRequested = True
    End With
    MsgBox "The Email has been send successfully to " & " " & Me.Text36 & " " & Me.Text35 & " " & Me.Text34
End Sub

--------------------
Johan
Winners don't do different things, they do things different.
Go to the top of the page
 
DanielPineault
post May 6 2019, 02:46 AM
Post#4


UtterAccess VIP
Posts: 6,853
Joined: 30-June 11



What happens if you set a breakpoint at
CODE
.HTMLBody = Variable_Body & Signature

What do you see as values for MyPath, MyFileName & strFileName?

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
johan
post May 6 2019, 05:03 AM
Post#5



Posts: 1,023
Joined: 24-April 08
From: Riebeek Kasteel, Western Cape, South Africa


Hi Daniel, I a bit unfamiliar with break points

--------------------
Johan
Winners don't do different things, they do things different.
Go to the top of the page
 
DanielPineault
post May 6 2019, 07:31 AM
Post#6


UtterAccess VIP
Posts: 6,853
Joined: 30-June 11



You might like to review

https://www.youtube.com/results?search_quer...+hour+debugging

Specifically,
  • MVP Hour Debugging Part I
  • MVP Hour Debugging Part II
  • MVP Hour Debugging Part III

--------------------
Daniel Pineault (2010-2019 Microsoft MVP)
Professional Help: http://www.cardaconsultants.com
Free MS Access Code, Tips, Tricks and Samples: http://www.devhut.net

* Design should never say "Look at me". It should always say "Look at this". -- David Craib
* A user interface is like a joke, if you have to explain it, it's not that good! -- Martin LeBlanc


All code samples, demonstration databases, links,... are provided 'AS IS' and are to be used at your own risk! Take the necessary steps to check, validate ...(you are responsible for your choices and actions)
Go to the top of the page
 
johan
post May 6 2019, 07:49 AM
Post#7



Posts: 1,023
Joined: 24-April 08
From: Riebeek Kasteel, Western Cape, South Africa


Daniel thank you, I will look at the videos.
As I mentioned earlier in my post it is not the code. When I test the code on PC with MS Access 2007 and Outlook 2007 the PDF attachment show in the attachment bar and not the words "Attached". It only happens on the PC with Office 2016 installed.

--------------------
Johan
Winners don't do different things, they do things different.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    21st September 2019 - 02:04 AM