Full Version: Calling Outlook Macro from Access VBA
UtterAccess Forums > Microsoft® Access > Access Forms
dabomb311
Does anyone know hot to call a macro from Outlook from vba in access?
freakazeud
Hi,
check this article ...you should get the idea.
HTH
Good luck
dabomb311
I tried :
ppOutlook.Run "NewMacro"
but, it gave me a "object does not support this property or method" error. any more ideas?
dabomb311
actually it i tried
ppOutlook.Run "NewMacros.chagintext"
no luck.
freakazeud
What exactly are you doing with the outlook macro again?
HTH
Good luck
dabomb311
the outlook macro changes the font in the body of the email. is there a way to do this in access when making the email?
Here is what i have in access to make the email:
Set appOutlook = CreateObject("Outlook.Application")
Set MailItem = appOutlook.CreateItem(olMailItem)


myTo = "blah"
mySub = "subj")
mybody = " Test Etst kljhkjhg hskgfn;dj hgdjh s;djg hisdg"
With MailItem

.Subject = mySub
.to = myTo
.CC = myCC
.body = mybody
.Display

End With
freakazeud
Yes...you can use automation to either create a rich text or html email.
Check my sample of an html version in the code archive.
HTH
Good luck
dabomb311
do you have anything to change the font?
freakazeud
Change the font how?
Look at my sample...you can use any html tags to modify whatever you want (font style/size/bold...).
HTH
Good luck
dabomb311
I figured out how to change the font. "<FONT FACE = 'FONT NAME'>"
Question thoe. How do i put a hyperlink in it. Lets say i want to put in there http://www.utteraccess.com.
Ocan type it in there but you cannot click it to go to the website. guess its a hyperlink.
freakazeud
You have to use HTML tags like you did for the font name or boldness or...!
The html code for a hyperlink would be something like:
lt;A HREF="http://www.YourLink.com">Text To Display</A>
HTH
Good luck
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.