- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
i made a iLogic rule to run my Outlook, and attach a PDF in a single e mail.
'------- Start of iLogic code -------------------
'Email Part of the Code adapted by Clint Brown @ClintCadline from Curtis Waguespack's blog
'http://inventortrenches.blogspot.co.uk/2011/04/using-inventor-ilogic-to-create-e-mail.html
'Ensure that this is a part file, exit on other files
oDoc = ThisDoc.ModelDocument
If oDoc.DocumentType = kPartDocumentObject
OType = 1
Else
OType = 0
End If
If OType = 0
MessageBox.Show("Email Code will only run on Part files", "Cadline")
Return
End If
'Roll up end of Part
ThisDoc.Document.ComponentDefinition.SetEndOfPartToTopOrBottom(True)
'Create Email Contents
oOApp = CreateObject("Outlook.Application")
oOMail = oOApp.CreateItem(olMailItem)
oAdressee = "Dear " + oPerson & vbLf & vbLf & "Attached please find '"
oFileName = ThisDoc.FileName + "' for review" & vbLf & vbLf & "Kind Regards"
oFrom = iProperties.Value("Summary", "Author")
'Create Email & Add Attachments
With oOMail
'.To = ajovicic@yahoo.com
.Subject = "Glas position " & AAA
.Body = "Hallo"
.attachments.Add ("C:\Users\user\Desktop\Neuer Ordner\Ablehnung der ZAV an Fieger am 29.01.2015.pdf")
.Display
End With
'------- end of iLogic code -------------------
.attachments.Add ("C:\Users\user\Desktop\Neuer Ordner\Ablehnung der ZAV an Fieger am 29.01.2015.pdf") - here is a example for arrach a single PDF file
But is it posible to attach all files in a folder in a single e mail. Withot the PathFile
Just like a Folder Path, and he attachs all PDFs or STPs in this folder
Thank you!
Solved! Go to Solution.