Using a file as source for .Body

T

Tylendal

I have an Access program that creates a file called "Notify_Request.rtf"
that's placed on the local drive. The application then opens a SendEmail
module that works just fine if the .Body is a text string. I have read that
Office 2002 and 2003 will allow a rtf file to be used but I'm stumbling over
how to modify my SendEmail module to allow this. I have Building
Applications with Microsoft Outlook version 2002 but trying to understand the
coding seems to excape me totally. I'm looking for a snipit of code I can
use that will allow me to use the Notify_Request.rtf file as the .Body of the
email. I can attach it with no problems but since I'm using voting buttons I
would prefer the body to have the data so when a voting button is clicked the
reply has the data. As an attachment, the data is not included.

I would appreciate assistance on this problem.

Fred Alyea
(e-mail address removed)
(e-mail address removed)
 
S

Sue Mosher [MVP-Outlook]

The code sample at http://www.outlookcode.com/codedetail.aspx?id=1333 shows
how to open a Word document and then use the "Office envelope" feature to
create a new message with the document's content as the message's content.

You would add your voting button code after the code returns the itm object
for the second time.
 
T

Tylendal

Thank you Sue...
I might have more questions but you have given me a starting point and
pointed me to a process I was unaware of.

Fred Alyea
 
T

Tylendal

Hello Sue...

When I loaded the code sample at
http://www.outlookcode.com/codedetail.aspx?id=1333 I have a compile error on
the line of code "Set itm = Application.Session.GetIteFromID(ID). Method or
Data member not found with the .Session highlighted. I have the Word and
Outlook libraries loaded.

What have I overlooked? Thanks for you help.

Fred Alyea
 
T

Tylendal

Sue...

You can disregard the reply as I was able to solve this issue after reading
your reply to darren and the code sample you directed him to at
http://www.outlookcode.com/codedetail.aspx?id=83.

The last issue I have revolves around the opening of the document and the
spellcheck. The application will run unattended so I would like to know how
to close the document and turn off the spellcheck programmatically if that is
possible.

Sue, your code samples have been of great value to me and as darren said
"Absoloutley brilliant. I cant thank you enough for your help and patients.

Fred Alyea
 
S

Sue Mosher [MVP-Outlook]

The object browser (F2 in VBA) is your friend. If you look at the Word object
model, you'll see that the Document object has a Close method. A search for
"spell" will lead you to the Word options for shell check, a bunch of Boolean
properties.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
T

Tylendal

Sue...
Im still stumbling on how to turn off the SpellCheck in Outlook. I can turn
off these items from Tools/Options/Spell
"Always suggest replacements for misspelled words"
"Always check spelling before sending"
"Use AutoCorrect when Word isn't the e-mail editor"
and when I do, it works just fine. If I don't the process hangs with an
assumed misspelled employee name.
I know these items have numbeical identifiers and I found a piece of code
that goes through the Main Menu showing what that identifiers are but it
doesn't show the Spell ones. I'm thinking I'm missing something but not sure
what.

Again I need your help you have time.
Thanks
Fred Alyea
 
S

Sue Mosher [MVP-Outlook]

I thought we were talking about spell check in Word. There is no programmatic
way to turn off spell check in Outlook. IN Word, you'd use the approach I
indicated -- go through the Word.Application object, using the properties you
can look up in the object browser.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
T

Tylendal

That explains why I cant find anything. Thanks Sue, I will stop looking...
grin My solution is to turn them off manually and then turn them on after
the program has run.

Your patients and knowledge have been so very helpful to me. I believe I
know a book I need to add to my library. Will be great if I can find an
eBook edition of it.

Again thanks. You're fantastic!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top