Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming VBA / October 2005

Tip: Looking for answers? Try searching our database.

populate subject

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Joel Allen - 28 Oct 2005 21:32 GMT
Hello,

I have a word template file that is set up for e-mail.  I try this code:

objDoc.Application.Mailer.Subject = "Email Subject"

and it says that it doesn't support the object.  It doesn't recognize
Mailer.Subject .

Any thoughts?

Thanks,
Joel
Sue Mosher [MVP-Outlook] - 28 Oct 2005 21:41 GMT
Mailer is an object in Word for Macintosh, not for PCs.

Maybe you could back up and provide a little more context on what you're trying to do.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hello,
>
[quoted text clipped - 9 lines]
> Thanks,
> Joel
Joel Allen - 28 Oct 2005 21:57 GMT
Ok sure.

Within my custom form, I press a button that runs a script that opens a word
template.  The word template has the e-mail option already on. ([File],
[Send To],[Mail Receipient])  My template has bookmarks which are
autopopulated from fields from my custom form.  Everything works great, but
I also want to autopopulate the Subject field in the word template, but you
can't put a bookmark in the subject field.

I hope that makes sense. Thanks for your help,
Joel

Mailer is an object in Word for Macintosh, not for PCs.

Maybe you could back up and provide a little more context on what you're
trying to do.

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Hello,
>
[quoted text clipped - 9 lines]
> Thanks,
> Joel
Sue Mosher [MVP-Outlook] - 28 Oct 2005 22:50 GMT
Ah, then you're just using the wrong objects. What you want is Document.MailEnvelope.Item. The Item object property gives you access to the Outlook MailItem, thus:

   objDoc.MailEnvelope.Item.Subject = "Email Subject"

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Ok sure.
>
[quoted text clipped - 18 lines]
>> Thanks,
>> Joel
Joel Allen - 28 Oct 2005 23:18 GMT
Thank God for you Sue, it worked!  I'm really trying to learn here  - I
looked in the object browser prior to this, and MailEnvelope did not exist.
How could I have found it?  Was I looking in the wrong place?

-Joel

Ah, then you're just using the wrong objects. What you want is
Document.MailEnvelope.Item. The Item object property gives you access to the
Outlook MailItem, thus:

   objDoc.MailEnvelope.Item.Subject = "Email Subject"

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Ok sure.
>
[quoted text clipped - 21 lines]
>> Thanks,
>> Joel
Sue Mosher [MVP-Outlook] - 29 Oct 2005 00:47 GMT
You would have found it if you'd searched the object browser for either "mail" or "envelope." Sometimes it just takes a little trial and error to figure out how to use things.  

Signature

Sue Mosher, Outlook MVP
  Author of Configuring Microsoft Outlook 2003
    http://www.turtleflock.com/olconfig/index.htm
  and Microsoft Outlook Programming - Jumpstart for
    Administrators, Power Users, and Developers
    http://www.outlookcode.com/jumpstart.aspx

> Thank God for you Sue, it worked!  I'm really trying to learn here  - I
> looked in the object browser prior to this, and MailEnvelope did not exist.
[quoted text clipped - 33 lines]
>>> Thanks,
>>> Joel
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.