Jump to content

Help with formatting text in e-mail


Go to solution Solved by water,

Recommended Posts

Ok so I figured propertyname corresponds to what's listed under "Syntax --> Expression", e.g for "MailItem.Actions Property", the propertyname is "Actions". Correct me if I'm wrong.

"Returns an Actions collection that represents all the available actions for the item. Read-only."

That's the description for "MailItem.Actions Property", just to clarify, that's only regarding VBA code? How do I find the available propertyvalues for each property in AutoIt?

Link to comment
Share on other sites

  • Replies 48
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Propertynames and -values are the same for all languages using COM.

Actions isn't a property but a collection of objects.

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Ok so I've obviously a lot more to learn, but what I'm trying to do is for my script to also mark the mail it runs with a specific color (e.g the ones you can bind in Outlook to ctrl + f1,2,3,4,5 etc.).

_OL_ItemModify($oOl, $oForward, Default, "propertyname=propertyvalue")

I thought I could do it with something like this if I could just figure out the propertyname and -value. I also looked at the OutlookExConstants,au3 and found e.g. "$olCategoryColorDarkGray = 14 ; Dark Gray", not sure if that can be used as a property value or even if it's relevant. Some help would be again much appreciated :)

edit: you said in an earlier post that properties that could be modified could be found "here: http://msdn.microsoft.com/en-us/library/ff870913%28v=office.14%29.aspx"

Where do I find the property names?

Edited by sackjarrow
Link to comment
Share on other sites

To set the category (and the related color) use
_OL_ItemModify($oOl, $oForward, Default, "Categories=xxx")

xxx is the name of a category. To get the list of valid categories run example script _OL_CategoryGet.au3

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

  • 3 weeks later...

Hi again and thanks for replying.

Not sure how long I should continue posting here but since it's related to the original issue I figure I might aswell.

After the mail is formatted into appropriate format I also wish to save the mail in a specific name. I found your OutlookUDF Ol_ItemSave, however I need to save the mail item in a specific name, which as far as I can tell is not possible.

Is there any possible way to do this?

Link to comment
Share on other sites

Don't bother. This is the correct place for asking.

_OL_ItemSave takes parameter $sPath as drive, directory, filename where to save the item

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Followup question regarding the ol_itemsave function:

Is it possible to set the function not to overwrite existing files with same name, but instead save the new item with an added "(2)" or similar? It seems the flagvalue only concerns attachments/items with attachments? Or will I have to add another function that checks for existing files with the same name etc. before saving?

Link to comment
Share on other sites

_OL_ItemSave only makes sure to not overwrite an existing attachment.

If the file already exists the default action is being taken by Outlook (overwrite the file, report an error - don't know, didn't test).

My UDFs and Tutorials:

Spoiler

UDFs:
Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...