Varia

Mailing - via Outlook

References:
Microsoft Outlook xx Object Library

Imports Outlook = Microsoft.Office.Interop.Outlook

Dim olApp As Outlook.Application
Dim olNamespace As Outlook.NameSpace
Dim olDrafts As outlook.MAPIFolder
Dim olMessage As Outlook.MailItem

olApp = New Outlook.Application
olNamespace = olApp.GetNamespace("MAPI")
olDrafts = _ olNamespace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts)
olMessage = DirectCast(olDrafts.Items.Add(), Outlook.MailItem)

olMessage.Recipients.Add("peter.de.keyser@daftrucks.com")
olMessage.Subject = "Subject"
olMessage.Body = "Body"
olMessage.BodyFormat = Outlook.OlBodyFormat.olFormatPlain
olMessage.Attachments.Add("C:\xcopy.exe")
olMessage.Save()
'mobjmailmsg.Send
olMessage.Close(Outlook.OlInspectorClose.olSave)

Get version

  • Application – Assembly information

My.Application.Info.Version.Major/Minor/Build/Revision
Nadeel van deze manier is dat dit niet nodig is voor het deployment en dat de versienummer dus altijd nog extra aangepast moet worden.

  • Publish – Publish version

If My.Application.IsNetworkDeployed Then
MsgBox("revision: " & My.Application.Deployment.CurrentVersion.Revision/Major/MajorRevision/Minor/MinorRevision/Build
End If
Nadeel is dat deze manier niet werkt als het geen deployment is.

PDF

http://www.codeproject.com/KB/vb/CompleteFormFieldsOfPDFs.aspx

Insert/update with seperate window

Dim mUpdate As New frmContactadres_I
mUpdate.mAdres = mContact.mAdres(intTeller)
mUpdate.ShowDialog()
mContact.mAdres(intTeller) = mUpdate.mAdres
mUpdate = nothing

Set mousepointer

Me.Cursor = Cursors.WaitCursor
'Loop here
Me.Cursor = Cursors.Default

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License