Oh. Seems I have to work VBA's shortcomings to do interesting things.
Thanks. Just a quick question.
In the original example from Outlook help, they call the initialisation routine "Initialize_handler" as if its an event.
Is it? If not, why the syntax?
Yes, the only namespace is MAPI so I prefer to use the session syntax myself (code just looks cleaner) but most examples I see use the GetNamespace syntax.
Cheers for the help, consider this one resolved ;)
OK. But do I only need to intantiate the outlook object and can use the child objects from that?
FYI : Rather than loop through every account, I prefer to use SyncObjects.item(1) which is All Accounts Groups anyway. Looping through the accounts means that all accounts get synced, then each...
Sorry, just reading my latest shot at it, I do instantiate the outlook object.
Dim WithEvents mySync As Outlook.SyncObject
Private Sub btnTest1_Click()
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
Set mySync =...
Cannot use "new" with "withevents" variable. The code you see is taken from MS Outlook 2007 help file. It works if placed in a form module, but no luck running it in a normal class module.
So... do I need to instantiate both a outlook.application and a outlook.application.Session.SyncObjects.item ?
Cant add the outlook project as a reference. I tried opening an outlook.application, but If I try running cOutlook.Initialise_handler it errors 424 and says object required.
Dim WithEvents mySync As Outlook.SyncObject
Dim objOutlook As Outlook.Application
Public Sub Initialize_handler()...
I have this code (from Outlook 2007 Help) that does a send receive for all accounts and runs code when the SyncEnd event is triggered.
Dim WithEvents mySync As Outlook.SyncObject
Public Sub Initialize_handler()
MsgBox "init reached"
Set mySync = Application.Session.SyncObjects.Item(1)...
Hi. In a Module (or class) in outlook I have written a sub.
In Access I am instantiating an outlook object.
Dim objOutlook As Object
Set objOutlook = CreateObject("Outlook.Application")
objOutlook.Module1.Test2
If the user defined sub in outlook is called Test2 ( in...
Ah well. At the start of the project I weighed up storage of the various data between registry, table, properties or a file. I usually use registry for settings type storage but I decided to use the DB properties to store company name, phone etc type data as I like to keep that with the...
Sounds like a good idea. I use it for storing Company data like Address, phone, etc. Thats in cBDBProps. I like to keep this dat with the database no matter what.
cBDBSettings is pretty much all registry. I need to access the registry to turn off Simple MAPI security popup and also to allow Word...
OK. LET and get for HomeGraphNumber.
'Which Graph No# to show on main form
Property Get HomeGraphNumber() As Integer
HomeGraphNumber = ReadRegValue("HKCU\Software\Bugs or Us\Bugs or Us Business System\Version 1.0.0\Settings\HomeGraphNumber")
End Property
Property Let HomeGraphNumber(ByVal...
Comes up with an error both getting and setting. Say I msgbox (or debug.print, watcher etc)
BorusDB.Settings.HomeGraphNumber .... Error, as above
BorusDB.Settings .... empty string, no error. Has no default so not expecting anything. Seems only to error on access to the sub-composite classes...
.
Me too. However, I have this with the existing code.
Its actually a sub, so no return value. Using my original code, it compliles and doesnt error at runtime.
Its not just creating a trusted document, but a trusted location, same as if you went into security settings to do it. I was just suggesting a "settings" form where you could create this location and remove if the user/admin/whatever decides. With windows security settings, its best to give an...
Hi. I am trying to replace
rst!(varMyvariable) = strSoundName
varMyvariable = "[Event" & MyCloseObject.[Tag] & "]"
where rst is a recordset. I have tried concatenating differently but to no avail. How do I do this correctly? I have a number of Fields, Event1, Event2, Event3 etc...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.