Page 1 of 1 1
Topic Options
#211339 - 2016-04-19 10:27 PM run an Access 2010 macro with kix
Karon Offline
Getting the hang of it

Registered: 2009-07-16
Posts: 87
Loc: Texas
This is another script that I am converting from an older version of kixtart to run on a windows 2008 server with version 4.63.
I am sure my problem is that I don't know how to identify the new version. Also, I am wondering if I should update the .mdb to a .accdb.
The following is the code I am working on updating.

 Code:
Dim $accessApp

If Exist ("c:\cognos\data\update.csv")
	$accessApp = CreateObject("Access.Application")
;	$accessApp.visible = 1
	$accessApp.OpenCurrentDatabase("C:\AccessDatabase\list.mdb")
	$accessApp.DoCmd.RunMacro("import")
;     Del "c:\cognos\data\update.csv"


$rc = SetOption("NoMacrosInStrings","On")
$rc = SetOption("NoVarsInStrings","On")
	$Root = CreateObject("Outlook.Application")
	$Session = $Root.GetNamespace("MAPI")
	$DefaultProfile = Outlook
	$Session.Logon($DefaultProfile)	
	$Folder = $Session.GetDefaultFolder(olFolderInbox)
	$Folder.Display

			$MailItem = $Root.CreateItem(0)
? "Root Creation: "+@Error
			$MailItem.Importance = 1
			$MailItem.Subject = "list Updated successfully!!!!."
			$MailItem.Sender = "sender@xxxplace.org"
			$MailItem.To = "receiver@xxxplace.org"
			$MailItem.Body = "list Updated successfully!!!!."
			$MailItem.Send
endif
	


The email portion works great!


Edited by Karon (2016-04-19 11:04 PM)

Top
#211340 - 2016-04-19 11:02 PM Re: run an Access 2010 macro with kix [Re: Karon]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Doood! Please obfuscate the email addresses AND domains in your code examples! It seems like you're at a medical office and likely subject to HIPAA compliance rules. There's no reason to give hackers even a millimeter of knowledge about your environment! \:\)

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211341 - 2016-04-19 11:05 PM Re: run an Access 2010 macro with kix [Re: Glenn Barnas]
Karon Offline
Getting the hang of it

Registered: 2009-07-16
Posts: 87
Loc: Texas
Thanks Glenn! - Let me know if th above changes will do the trick.
Top
#211342 - 2016-04-19 11:07 PM Re: run an Access 2010 macro with kix [Re: Karon]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
Glenn, you could have sold them security services...
_________________________
!

download KiXnet

Top
#211343 - 2016-04-19 11:23 PM Re: run an Access 2010 macro with kix [Re: Lonkero]
Karon Offline
Getting the hang of it

Registered: 2009-07-16
Posts: 87
Loc: Texas
LOL Lonkero! Glenn is just a nice guy that way!
Top
#211344 - 2016-04-19 11:49 PM Re: run an Access 2010 macro with kix [Re: Karon]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Rule 17 - don't be associated with a company that makes the 5 o'clock news for a security breach. Rule 17a - don't be that company's IT provider!!! \:D

Just doing my part to keep us safe. \:\)
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211345 - 2016-04-19 11:58 PM Re: run an Access 2010 macro with kix [Re: Glenn Barnas]
Karon Offline
Getting the hang of it

Registered: 2009-07-16
Posts: 87
Loc: Texas
I do appreciate it. Don't want to be one of "them"!
Now if anyone knows the answer to my question....

Top
#211346 - 2016-04-20 01:06 AM Re: run an Access 2010 macro with kix [Re: Karon]
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
I am having hard time seeing a question in the post.
_________________________
!

download KiXnet

Top
#211349 - 2016-04-20 02:45 PM Re: run an Access 2010 macro with kix [Re: Lonkero]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
Yeah - the telepathic transmission power doesn't reach all the way to Joisey! ;\) (Especially if you aren't getting it in OK, just one state away!)

Karon - please clarify what specific error or fault you're seeing with that code.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211350 - 2016-04-20 03:21 PM Re: run an Access 2010 macro with kix [Re: Glenn Barnas]
Karon Offline
Getting the hang of it

Registered: 2009-07-16
Posts: 87
Loc: Texas
Never mind - I can be such a dunce - I was looking at the live version of the mdb, but I had copied to a local location so that the live wouldn't blow up!
You guys are so patient with me!! Hopefully I can get the rest of these updated without any more assistance...... \:D

Top
#211351 - 2016-04-20 07:23 PM Re: run an Access 2010 macro with kix [Re: Karon]
Glenn Barnas Administrator Offline
KiX Supporter
*****

Registered: 2003-01-28
Posts: 4402
Loc: New Jersey
10 minutes in the corner with the dunce cap for you! \:D

We're here for ya so long as you can stand the occasional tease!

Glenn
_________________________
Actually I am a Rocket Scientist! \:D

Top
#211352 - 2016-04-20 07:48 PM Re: run an Access 2010 macro with kix [Re: Glenn Barnas]
Karon Offline
Getting the hang of it

Registered: 2009-07-16
Posts: 87
Loc: Texas
After 20 years in the Marines - I better be able to take it!! LOL
Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
1 registered (Allen) and 1607 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.071 seconds in which 0.031 seconds were spent on a total of 13 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org