Quantcast
Channel: OfficeforMacHelp.com » AppleScript
Viewing all 11 articles
Browse latest View live

Updated link for Barry’s AppleScripts for Office 2011

$
0
0

Use this link to download Barry Wainwright’s Outlook 2011 scripts: Barry’s AppleScripts Page.

For some reason, Mobile Me capitalised the site name (Scripts), and it won’t change back. Mobile Me is case sensitive.

Currently available for download on Barry’s AppleScripts Page:
  • Remove Duplicates v: 2.1 Detects and deletes duplicate messages within the selected messages. This script works by comparing the Message-ID header, uniquely identifying duplicates.
  • File in Sub-Folder v:1.0 Takes the currently selected messages, creates a sub-folder using a name that you choose, then moves the messages into the sub-folder.
  • File Messages by Year v:1.0 Takes the currently selected messages, creates a sub-folder using a name that you choose, then moves the messages into the sub-folder.



Manage Outlook contacts using AppleScript

$
0
0

Our contacts often share the same information. For example, we may know two or more people who work for the same company and share the same address, phone number and website. Invariably, as we add contacts, though, we sometimes enter slightly different information for each one. The first contact record may list a company name of “Microsoft” while a second lists “Microsoft Corporation”.

Using Outlook’s AppleScript capabilities, we can standardize this information in our contacts. I’ll first show how to make an Automator action that enables you to select multiple contacts and set the same field to the same information in all of them. Then I’ll provide an AppleScript that does something Outlook should already do: allow us to duplicate a contact record so that we can quickly add someone new.

For those who are uncomfortable with scripting, I’ve made Standardize Contacts 1.0 and Duplicate Contacts 1.0 available for download.

Create an Automator workflow to standardize contacts

Automator gives non-scripters a simple way to use AppleScript. Microsoft Office for Mac 2011 comes with nearly 100 actions that each do one thing such as creating a new workbook in Excel or converting PowerPoint slides to movies. Outlook itself has 21 various actions that can be strung together in a list in Automator to accomplish some complex feats. We’ll use two of these actions called Get Selected Outlook Items and Set Outlook Contact Properties.

  1. Launch the Automator.app application found in the /Applications folder. When prompted, select Workflow and click the Choose button.

    Automator choose workflow

  2. Locate Microsoft Outlook in the Library on the left and select it. Locate the Get Selected Outlook Items and Set Outlook Contact Properties actions in the middle column. Drag them into the workflow area on the far right.

    Note how the first action hooks into the second action. This illustrates the workflow we’ll be using, which is to take the selected items and set the properties of each.

    Automator add actions

  3. Click Options at the bottom of the Set Outlook Contact Properties action and select Show this action when the workflow runs.

    Automator set options

  4. Select Save… from the File menu and name the new workflow “Standardize Contacts.workflow”. Save this new file into your Outlook Script Menu Items folder located in your home folder (where ” ~ ” denotes your home folder):

    ~/Documents/Microsoft User Data/Outlook Script Menu Items

    Automator save workflow

Once the workflow is saved it’s ready to use. My company “Merrill” has rebranded itself a few times and goes by an assortment of names such as “Merrill”, “Merrill Corporation” and “Merrill Communications LLC”. Our current branding prefers we standardize on “Merrill Communications LLC”.

To standardize my company contacts, I simply search for “Merrill” and select all the found contacts.

Automator before

I then select my Standardize Contacts workflow from the AppleScript menu in Outlook.

Automator Standardize Contacts

In the dialog window that appears, I select the Company property and enter “Merrill Communications LLC” as the value. I then click the Continue button.

Automator company name

The Company fields are now the same across my contacts.

Automator standardized

If you’re uncomfortable with creating an Automator workflow then you may download Standardize Contacts 1.0.

Create an AppleScript to duplicate contacts

While this does involve using the AppleScript Editor application, I’d rank it a “1” on an easiness scale of “1-5″. It’s very simple to copy and paste or retype the code below and save it as a file.

  1. Launch the AppleScript Editor.app application found in /Applications/Utilities/.
  2. Enter the following script into the new script window. The line that begins with “display dialog” and the next line are actually one long line.
    tell application "Microsoft Outlook"
    	set theContacts to selected objects
    	repeat with aContact in theContacts
    		try
    			set theAddressBook to address book of aContact
    		on error
    			display dialog "One or more of the selected items is not a contact. ¬
    			Please verify your selection(s)." with icon 2 with title "Alert!"
    			return
    		end try
    		duplicate aContact to theAddressBook
    	end repeat
    end tell
  3. Select Save… from the File menu and name the new script “Duplicate Contact.scpt”. Save this new script into your Outlook Script Menu Items folder located in your home folder (where ” ~ ” denotes your home folder):
  4. ~/Documents/Microsoft User Data/Outlook Script Menu Items

Once the script is saved it’s ready to use. To duplicate one or more contacts, select them in your Outlook Address Book or Exchange Contacts list and then select Duplicate Contact from the AppleScript menu in Outlook.

AppleScript select script

Each selected contact will be duplicated into the same address book or Exchange Contacts list as the original.

If you’re uncomfortable with using AppleScript then you may download Duplicate Contacts 1.0.

Microsoft updates AppleScript dictionary for Outlook 2011 SP1

$
0
0

Yesterday, Microsoft released the Microsoft Office 2011 for Mac SP1 (14.1.0) Update. Outlook garnered a fair number of bug fixes and new features, some of which had been missing since Entourage. Under the hood it received a healthy dose of new commands, classes and properties in its AppleScript dictionary as well.

Compared to Excel, PowerPoint and Word, the amount of additional AppleScript support added with the 14.1.0 update is more than ten-fold their combined total, much of which had been long-standing requests from the scripting community. Scripters can view these new properties using the AppleScript Editor application found in /Applications/Utilities, selecting File –> Open Dictionary… and choosing Microsoft Outlook.app from the list.

Outlook Suite

The overall Outlook Suite added more than 50 new properties to the dictionary to control the preferences set under Outlook menu –> Preferences… A few examples:

  • General
    group similar folders — sets Outlook to use unified folders for Inbox, Sent Items, etc.
    hide on my computer folders — sets Outlook to show or not show folders “On My Computer”
  • Notifications & Sounds
    display alerts — sets whether or not Outlook will display a desktop alert when new mail arrives
    bounce dock icon — sets whether or not the Outlook icon will bounce in the dock when new mail arrives
    play sound on new message — sets whether or not Outlook will play a sound when new mail arrives
  • Categories
    categorize message from contacts — sets Outlook to apply categories based on the categories of the sender’s contact
    show new categories in navigation pane — sets Outlook to show new categories in the navigation pane while viewing the Calendar and Contacts
  • Reading
    mark item as read — sets when Outlook should mark items as read
    expand single conversation — sets Outlook to show an entire conversation when a message is selected

  • Composing
    use default account for replies and forwards — sets Outlook to use a specific account when replying or forwarding messages
    include myself as
    — sets Outlook to Cc or Bcc the sender

A new contacts panel class enables interaction with the Contacts Search window and includes properties such as:

  • search string — text to search
  • search typename search or all fields
  • current source — directory source

Outlook includes access to its new most recently used (MRU) list for meeting rooms:

  • meeting room mru — the locations property lists recently used locations

One of the most requested features was the ability to control imports into Outlook. That’s now possible for a variety of import options:

  • import olm — import an Outlook archive file
  • import pst — import an Outlook personal folders file (from Outlook for Windows)
  • import rge — import an Entourage archive file
  • import identity — import from a 2004, 2008 or EWS identity folder

Account Suite

New Exchange commands enable the scripter to retrieve information he otherwise wouldn’t be able to access including an autodiscover results class that can return these properties and more:

  • primary smtp address — Exchange account’s primary SMTP address
  • server — Exchange account’s server address
  • ldap server — Exchange account’s LDAP server address
  • oab manifest url — Address to retrieve the Offline Address Book (OAB)

The gal download directory property will allow the scripter to specify a directory for OAB download, which is something that cannot be done via Outlook’s GUI interface. A rooms property will allow the scripter to specify a directory for an account’s meeting room index.

Outlook’s dictionary also includes delegated account and other users folder account classes for dealing with Exchange delegates and shared folders.

A new autodiscover command will return results from an Exchange autodiscover query when executed with at least an email address and user name.

Mail Suite

Outlook’s mail features are improved with the following properties:

  • unread count — retrieve the unread count for a folder
  • plain text content — retrieve the body of a mail message without HTML tags

It also has a new command to import eml files into specific mail folders.

Contact Suite

Scripts can now retrieve notes in contacts as plain text content and convert information from contacts to vcard data format to be used externally. Additionally, scripts can now import vcf files into specific address books.

Calendar Suite

Similar to contacts, scripts can now retrieve event information as plain text content without HTML tags and convert calendar information to icalendar data format for external use. Scripts can also import ics files.

Task and Note Suites

Tasks and Notes are now accessible as plain text content or icalendar data.

Signature Suite

The Signature Suite is brand new in Outlook 14.1.0! Scripts can now manipulate signature data using these properties:

  • name — name of the signature
  • content — HTML content of the signature
  • plain text content — content of the signature as plain text
  • include in random — whether or not the signature is included in the random list

Nothing in the Signature Suite, however, enables a signature to be assigned to an account or to insert an image.

Rules (including the Mailing List Manager and Junk E-mail Protection) and autocorrect features are still not scriptable. Also, Visual Basic scripting is not included in Outlook nor is any sort of plug-in architecture, which Outlook for Windows has. This makes cross-platform scripting solutions impossible to implement for the time being.

From the Outlook forum: ‘More than 2 week reminders?’

$
0
0

mlevin77 asks:

I am moving to Outlook 2011 from Entourage 2008. A bunch of my calendar items have reminders that are more than 2 weeks in advance, because in Entourage I could specify however many days I wanted. But in Outlook, there is only a dropdown menu and it only goes to 2 weeks. Is there any way to specify more than 2 weeks, and if not, does it still properly understand how (when) to remind for items that do have a longer time period set already?

Outlook for Mac does only allow folks to choose from pre-defined reminder times with the earliest reminder being two weeks before the event. AppleScript, however, can set this reminder to practically anything. The following basic script snippet shows how:

tell application "Microsoft Outlook"
	set theEvent to the selection
	set reminder time of theEvent to 43200 -- minutes
end tell

The number on the third line is the number of minutes in advance for the reminder. In this case 43200 is 30 days. Paste the snippet into the AppleScript Editor found in /Applications/Utilities and save it as a script into your home folder (where ” ~ ” denotes your home folder):

~/Documents/Microsoft User Data/Outlook Script Menu Items

AppleScript menuTo use it you will need to select your event in the calendar and then run the script from the AppleScript menu next to the Help menu. The long number in the third line is in minutes. Adjust the minutes to however long in advance you want notification.

I’ve written a more advanced version of this script that prompts for a new reminder time and includes some more helpful windows. Download and install the script following the instructions in the included Read Me file. With a calendar event selected in the calendar or while the calendar event’s window is open, select Set Custom Reminder from the AppleScript menu.

Set Custom Reminder menu item

Enter a custom reminder time.

Set Custom Reminder dialog

The new reminder time is immediately inserted into the calendar event.

Set Custom Reminder field

Download the script.

Add week numbers to Outlook for Mac’s calendar

$
0
0

Week numberUpdate: Beginning with the Office for Mac 14.2.0 Update (SP2) Microsoft added week numbers to Outlook for Mac. Enable them first under Outlook menu –> Preferences… –> Calendar. They appear in either Week or Work week view next to the date range above the calendar.

Three years ago I posted a script to add week numbers to Entourage. I’ve updated that script for Outlook for Mac and made some improvements based on the comments I received. Download Add Week Numbers 3.0.

Outlook for Mac itself does not have a feature to display week numbers on its calendar. If folks would like to see this feature added then please let Microsoft know using the Send Feedback tool under the Help menu of any Office for Mac application. For now, this AppleScript works on the same premise as the original. It adds a new calendar event to each week that displays both the week number and the ordinal date (day 1-365 of the year).

This script improves on the original in a few ways:

  1. Most importantly, week numbering is calculated based on ISO standards for calculating week numbers.
  2. Users can select which day to display week numbers. This is useful in countries or work environments where Monday is typically the first day of the week or work week. It’s useful to anyone else who simply chooses to display week numbers on a different day, such as Wednesday, for easier viewing.
  3. Users can also select which calendar to display week numbers. Since Outlook allows for multiple calendars, I suggest creating one just for week numbers so that week numbers can be toggled on and off. More on that later.
  4. Dates are calculated in format MM-DD-YYYY or DD-MM-YYYY, depending on the Mac’s International settings. This should accommodate most country date formats.
  5. Users can customize the words “Week” and “Day” at the beginning of the script to display these words in their own languages.

Installation

To install this script select About This Menu… from the AppleScript menu in Outlook for Mac.

About This Menu

Click the Open Folder button in the dialog to open the Outlook Script Menu Items folder Finder.

Open Folder

Drag the the Add Week Numbers.scpt file to this folder to move or copy it there. The script will appear immediately in Outlook’s AppleScript menu without needing to restart.

Using Add Week Numbers

Once installed, select Add Week Numbers from Outlook’s AppleScript menu.

Add Week Numbers

Enter a year and click the OK button.

Enter a year

Next, select a calendar to display the week numbers. What I’ve done below is create a new calendar in my Exchange account called “Display Week Numbers”. This gives me two advantages, which I’ll describe later. Select this or any other calendar and click the OK button.

Select a calendar

Finally, select a day of the week to display the week numbers. Most folks will probably prefer to display them on the first day of the week or first day of the work week. Any day is acceptable.

Select a day of the week

In a few seconds the selected calendar will display the week days.

Calendar with week numbers

Using a dedicated calendar to display week numbers

Consider creating a new calendar just to display week numbers. This offers two advantages:

  1. The week numbers can be toggled off and on. You can display them when you want them and hide them when you don’t.
  2. If you add them to a dedicated Exchange calendar then they will sync to an iPhone or other iOS device where the calendar can be toggled off and on as well.

To create a dedicated calendar, first click the Calendar button in the navigation pane on the left to switch to Calendar view. Next, select either On My Computer or an Exchange account in the Navigation pane on the left. Select File menu –> New –> Folder.

Create new folder

This will create a new calendar under the account ready to rename. Call it something like “Display Week Numbers”.

Display week numbers calendar

When running the script, choose this as the calendar to display week numbers. Uncheck it to hide week numbers on the calendar.

Exchange users will notice the week numbers when viewing the calendar month and selecting the day that holds the week number event.

Week numbers on iPhone

To hide the week numbers, click the Calendars button in the upper left corner and deselect the Display Week Numbers calendar by removing the checkmark.

Deselect week numbers on iPhone

Customizing for different languages

By default the script uses the English words “Week” and “Day” when displaying the week numbers and day numbers. These words can be changed to equivalent words in any other language by changing the following two lines near the beginning of the script:

-------------------------------------------------------------------------
-- Customize words "Week" and "Day to your language so
-- that your calendar items are more easily readable.
-------------------------------------------------------------------------

 

set languageWeek to "Week"
set languageDay to "Day"

Download Add Week Numbers 3.0.

See also: Add week numbers to the Entourage calendar

Undocumented tip: Use the keyboard to delete unwanted recent addresses

$
0
0

MRUTwo weeks ago I posted an undocumented tip for quickly scrolling to a specific date from the Microsoft Answers forum. Today, another forum poster provided a great undocumented tip for using the keyboard to quickly delete unwanted email addresses from most recently used (MRU) list.

As Outlook for Mac sends and receives mail it stores the most recently used 200 email addresses in the MRU. You see the MRU at work every time you address a new email message and a list of Contacts and Recent Addresses appears while typing a name into the To, Cc or Bcc fields.

Over time the MRU gets cluttered with useless addresses from mailing lists, website auto-responders, online promotions and even spam addresses. To keep the MRU clean of spam addresses just mark a spam message as “Junk” and its address will automatically be removed from the list.

To delete the rest of the addresses click the Remove from recent addresses button (the gray “X” to the right of the email address).

A faster way to delete these is to use the keyboard command fn + Delete. The “fn” refers to the function key found in the lower right corner of many keyboards. With the unwanted address selected in the MRU list type fn + Delete and it is removed immediately from the list. The next item in the list takes its place. Keep tapping fn + Delete to keep removing these unwanted addresses. Use the Up and Down arrow keys to quickly move to another list item to delete it.

Addendum: This tip explains how to quickly delete one unwanted address at a time but how does an Outlook user clear all recent addresses? Outlook doesn’t include a menu command or preference setting but it does have an AppleScript command just for this:

tell application "Microsoft Outlook"
	clear recent recipients
end tell

Copy and paste the above three lines into a new window in the AppleScript Editor application found in /Application/Utilities and click the Run button to clear recent addresses. To keep this script readily available select File menu –> Save As… –> Clear Recent Recipients.scpt and save this into your Outlook Script Menu Items folder found in your Home folder (where ” ~ ” denotes your Home folder):

~/Documents/Microsoft User Data/Outlook Script Menu Items

To run the script at any time select it from the AppleScript menu just to the right of the Help menu in Outlook.

Script: Print Attachments

$
0
0

If you need to print an email showing attachments included or to print selected text, download Outlook Print Scripts v0.4 , Author: Lutz MEYER. If you find these scripts useful, please make a donation to the author. See text file included for donation info.

There are three scripts included.

  1. Print Message with Attachments above – This prints with the attachment list above message text
  2. Print Message with Attachments below – This prints with the attachment list below message text
  3. Print Message with Selected Text – This prints just selected text in the email

Place the scripts in the Script Menu Items folder.

Beginning with the 14.2.0 update Outlook’s scripts folder moved to a new location.

Old Location:  ~/Documents/Microsoft User Data/Outlook Script Menu Items

New Location:  ~/Library/Application Support/Microsoft Office/Outlook Script Menu Items

Note: In Mac OS 10.7, the Library folder is hidden. To access the Library folder see options here.

Easiest way to get there is select About This Menu… from the AppleScript menu in Outlook and use the Open Folder button.

Third Party Option

Mail Archiver X is not just for backing up your data. One of it’s features is print with attachments. All major email clients are supported: Apple Mail, Eudora, Outlook, Entourage, Powermail, Postbox and Thunderbird.  Gmail and Exchange are supported, too.

Resources

You can find more scripts to use with Outlook here. Outlook for Mac Scripts.

For help converting and creating new scripts for Outlook, you can join the ScriptOutlook — Mailing list for discussion of scripting Outlook for Mac More Info

Use AppleScript or VBA to paste unformatted text in Word for Mac

$
0
0

Working with formatted text copied from a stylized source such as a web page can make editing in Word for Mac laborious. For someone who does it frequently, selecting Edit > Paste Special, choosing Unformatted Text and clicking the OK button is a lengthy mundane process. This command has no quick keyboard shortcut and Apple’s feature to assign a keyboard shortcut won’t work because the command isn’t in a menu.

Fellow MVP Rich Michaels recently answered a request to make this easier. He provided a three-line snippet of Visual Basic (VBA) code for a macro that’s accessible using a keyboard command. For those unfamiliar with VBA the same is possible using AppleScript.

AppleScript or VBA?

Which is better? That depends on the need.

AppleScript is easier to read and native to Mac. Novice scripters may find the AppleScript language a challenge to learn but it uses simple English language for authoring. To have Word display a dialog on a Mac requires one line of AppleScript:

tell application "Microsoft Word" to display dialog "Hello World!"

AppleScript is also available system-wide on a Mac, which means it can take information from one application and use it in another scriptable application. Unlike VBA, though, it’s not cross-platform and won’t work on Windows.

VBA is the Windows cousin to AppleScript. It’s available system-wide on Windows. It may also be more difficult for someone to learn because of its programming syntax. To have Word display a dialog using VBA requires creating a macro with the script:

Sub showMessage()
    MsgBox "Hello World!"
End Sub

This uses about the same amount of text as AppleScript but may not be as easy to understand. However, it will work on both Word for Windows as well as Word for Mac.

When deciding which scripting language is more suited to the need just keep in mind:

  • Do I need my script to work in Office for Windows too? Use VBA.
  • Do I need my script to exchange information between Word and another application? Use AppleScript.
  • Will I only use this script in Word for Mac? Use either AppleScript or VBA.

AppleScript: Paste Unformatted Text

To create an AppleScript to paste unformatted text in Word:

  1. Open AppleScript Editor, located in the /Applications/Utilities folder.
  2. Copy the following AppleScript code and paste it into the AppleScript Editor window.
    tell application "Microsoft Word"
    	paste special (text object of selection) data type paste text
    end tell

    AppleScript window
  3. Choose File > Save and name the new file “Paste Unformatted Text\comU.scpt”. Select Script from the File Format drop-down menu. Click the Save button to save the file on the desktop.
    Save script
    Note the “\comU” characters at the end of the file name. This is a quick way of assigning a keyboard command when placing a script into the AppleScript menu. The letters c, o and m define the modifier keys—Control key, Option key and Command key. When pressed together the keyboard command Control-Option-Command-U will invoke the script.
  4. Open Microsoft Word and select the About This Menu command in the AppleScript menu.
    About This Menu
  5. Click the Open Folder button to open the Word Script Menu Items folder in the Finder.
    Open Folder button
  6. Drag the “Paste Unformatted Text\comU.scpt” file from the desktop to the Word Script Menu Items folder.
    Drag script to folder
  7. Return to Word and note the script now appears in the AppleScript menu with its keyboard command.
    Installed script

VBA: Paste Unformatted Text

To create a VBA macro to paste unformatted text in Word:

  1. Select Word menu > Preferences and click the Ribbon preference item.
  2. In the Customize section enable the Developer tab and click the OK button.
    Enable Developer tab
  3. Click the Developer tab in the ribbon at the top of an open Word document and then click the Macros button.
    Macros button
  4. In the Macros window enter “PasteUnformattedText” (with no spaces) in the “Macro name” field. Select “Normal (Global Template)” from the “Macros in” drop-down menu and enter “Pastes unformatted text into the current Word document” in the Description field. Click the Create button to continue.
    New macro
  5. The “NewMacros (Code)” window opens and automatically populates the name and description as well as some basic code for the new macro. Note the empty line just above “End Sub”.
    New macro code
  6. Copy the following VBA code and paste it into the empty line of the code window.
    Selection.PasteSpecial Link:=False, datatype:=wdPasteText, Placement:= _
            wdInLine, DisplayAsIcon:=False
    <a href="http://www.officeformachelp.com/wp-content/uploads/2013/07/newmacrocodeedited.png"><img class="alignnone size-full wp-image-8296" alt="New macro edited" src="http://www.officeformachelp.com/wp-content/uploads/2013/07/newmacrocodeedited.png" width="585" height="165" /></a>
  7. Click the View Microsoft Word button in the Standard toolbar to close the macro and return to the Word document.
    View Microsoft Word button
  8. To assign a keyboard shortcut to this macro choose Tools > Customize Keyboard.
    Customize Keyboard
  9. In the Customize Keyboard window select Macros in the Categories field and then select the “PasteUnformattedText” macro in the Macros field. Click into the “Press new keyboard shortcut” field and press Control-Option-Command-U to enter the new keyboard shortcut. Click the Assign button and then click the OK button to close the window. Note the new macro and its keyboard shortcut will not appear in any menu.
    Customize Keyboard window

Using either script

Both scripts paste only unformatted text even if pictures are included in the copied data.

  1. To use either script select formatted text from another Word document or another source such as a web page. If the format of the web page makes excluding pictures or other web graphics difficult just include them.
    Copy web page
  2. Open a new or existing Word document and invoke either the AppleScript or VBA macro using the Control-Option-Command-U keyboard command. If using AppleScript, optionally choose the Paste Unformatted Text command from the AppleScript menu.
    Pasted text

Thanks to Rich Michaels for inspiring this post and providing the VBA macro code in his Microsoft Answers forum post. Thanks also to the Word:mac site on MVPs.org for providing the AppleScript code.


Use AppleScript to instantly view a date in Outlook for Mac’s Calendar

$
0
0

In an earlier blog post I provided an undocumented tip for quickly scrolling to a date in Outlook for Mac’s Calendar. Now, using the following AppleScript a user can navigate instantly to a specific date.

Get the script

Download and open the script in Script Editor or view it at the end of this post. Save the new script to your desktop as “View Date\comV.scpt”. The “\comV” part of the file name will give the script the keyboard shortcut Control-Option-Command-V. Change the modifier keys or the letter if needed.

Installation

To install this script choose the AppleScript menu > About This Menu in Outlook for Mac.

About This Menu

Click the Open Folder button in the dialog to open the Outlook Script Menu Items folder in the Finder.

About This Menu

Drag the the “View Date\comV.scpt” file into this folder. The script will appear immediately in Outlook’s AppleScript menu without needing to restart.

Using View Date

Once installed, choose View Date from Outlook’s AppleScript menu or use the keyboard shortcut Control-Option-Command-V.

View Date menu item

Enter a date and click the OK button. The date appears in the current calendar view.

View Date dialog

The script accepts any valid date OS X can understand such “8/4/13″ or “August 4, 2013″.

 The script

(*

--------------------------------------------
View Date 1.0
©2013 William Smith
bill@officeformachelp.com

This script may be freely modified for personal or commercial
purposes but may not be republished without prior consent.

If you find this script useful or have ideas for improving it, please let me know.
--------------------------------------------

This script displays the date entered in the Outlook calendar.

Installation: Place this script in your user home folder in this location where " ~ "
denotes your home folder:
~/Library/Application Support/Microsoft/Office/Outlook Script Menu Items.
To view the ~/Library folder, hold the Option key while selecting
Go menu --&gt; Library in the Finder.

How to use:

In Outlook select "View Date" from the Script menu or press Control-Option-Command-V 
and enter a valid date. Click the "OK" button to display the date.

Change log:

1.0

Created the View Date 1.0 script.

*)

tell application "Microsoft Outlook"

	-- repeat the dialog until either a valid date is entered or the user cancels
	set success to false
	repeat until success is true

		-- Ask for a date and automatically insert today's date
		set todaysDate to short date string of (current date)
		set newDate to (display dialog "View this date in Outlook..." default answer todaysDate with title "View Date" with icon 1 buttons {"Cancel", "OK"} default button {"OK"})
		if button returned of newDate is "Cancel" then
			exit repeat
		else
			try

				-- Attempt to go to the date
				go to date (text returned of newDate)
				set success to true
			on error

				-- This wasn't a valid date. Offer to try again or cancel.
				display dialog "This is not a valid date." buttons {"Cancel", "Try Again"} default button {"Try Again"} with icon stop
			end try
		end if

	end repeat

end tell

Microsoft revamps features for Outlook for Mac 15

$
0
0

Outlook 15Microsoft released Outlook for Mac 15, departing from its history of bundling the application with its Office for Mac suite. Also new was that the release was targeted exclusively at Office 365 customers and not made available as a standalone product. It required activation via online subscription and offered no method for entering a serial number for perpetual use of the product.

The application was referenced in Office Blogs simply as “Outlook for Mac”. It was not referenced as Outlook 2015, avoiding any hint about the name of the next version of Office for Mac—presumably “Office for Mac 2015″. The only versioning Microsoft has provided is “15.3” as shown in Outlook’s About Outlook menu.

While the application includes some major under the hood changes, the interface is practically the same as its Outlook 2011 predecessor. It boasts little new functionality. New functionality that was added was almost exclusively for Office 365 customers. Some long-standing features were actually removed too.

Update: Outlook 15 requires OS X 10.9.4 or later.

Update: In addition to Office 365, Outlook 15 supports POP, IMAP and Exchange Server 2010 SP2 or higher.

What’s new?

Visibly, not much was new apart from cosmetic changes such as an overall color change to Microsoft’s signature blue and white, font changes, updates to icons and a few user interface tweaks. Its backend support, though has greatly changed.

Update: Outlook now has pre-emptive threading using Apple’s Grand Central Dispatch (GCD) threading model introduced in OS X 10.7. GCD puts the responsibility of managing threads on the operating system rather than with the application. The application is faster and more responsive because the OS X operating system performs more efficiently on single-processor machines and the application can utilized multi-processor hardware.

Update: Outlook 15 was designed to work independently of Outlook 2011. It’s a self-contained application that shares no code or common files with its predecessor. For the purposes of testing and aclimating to the new version, end-users can run both Outlook 15 and Outlook 2011 side-by-side at the same time.

Following are some of the new features in Outlook 15.

Activation

Outlook now requires online activation via an Office 365 subscriber account. Initial launch of the newly installed application welcomes the current user and displays information about faster search. It then walks through several screens for connecting to an Office 365 account.

Outlook 15 Welcome Outlook 15 Search Outlook 15 Sign In Outlook 15 Account Name Outlook 15 Sign In Complete

Activation does not apply to all users on a computer. Each user must run the activation process under his own OS X user account, however, multiple activations on one computer count only as one activation.

Profile

“Profile” is Outlook’s new name for “identity” used by Outlook 2011 and Microsoft Entourage. Microsoft use to store identities, folders containing the user’s mail data and other Office data, within the home folder’s Documents folder. Outlook’s profile is stored in the home folder’s Library folder. The specific path to the profile is:

~/Library/Group Containers/UBF8T346G9.Office/Outlook/Outlook 15 Profiles/Main Profile

Update: Important to note is Outlook is now is sandboxed according to Apple’s sandboxing guidelines. The new path reflects this change.

With Outlook 2011 and Entourage, a user could manage his identity by holding the Option key as he launched the application. That feature no longer exists. Instead, Microsoft has buried its Outlook Profile Manager.app utility inside Outlook’s app bundle”

/Applications/Microsoft Outlook.app/Contents/SharedSupport/Outlook Profile Manager.app

Outlook Profile Manager

Database

Most notable about Outlook is Microsoft now stores the indexing database in a SQLite database rather than a proprietary format. A SQLite database is a self-contained database requiring no server backend and its source code is public domain. Individual mail messages, attachments and other Outlook data are still stored in a folder hierarchy, which is indexed by the database for faster retrieval. Microsoft claims the new database format provides better overall performance.

Missing from the Outlook Profile Manager.app tool is any method for repairing the database. Microsoft no longer makes this a feature of Outlook for Mac. When Outlook detects the SQLite database needs repair, it will prompt the user.

Also missing is the Microsoft Database Daemon process that ran in the background. The daemon was responsible for much of the process in Outlook 2011 and Entourage. Outlook no longer includes a background process. That also means Outlook Reminders has no method for displaying alerts for upcoming events or other reminders when Outlook is not running. The application must be running for those to work.

Apps

Office 365 includes a new feature called Apps, which are cross-platform widgets that work not only in a web browser but supporting mail clients like Outlook. Apps extend functionality based on the content of a message. They can display an inline Bing map, integrate with contact management systems such as SAP and Google contacts or even track package shipments.

Apps are added to an Office 365 account online and then appear in Outlook. To add or remove apps, click the Manage Apps button at the top of a message body in Outlook.

Manage Apps

This opens a window to Office 365. Log in to the account and click the plus sign ( + ) to add apps from the Office Store or using a URL provided by a third party vendor.

Add / Remove apps

When a message contains data an app recognizes, Outlook will display buttons above it and offer the user choices.

Actionable Items app

Archives

Outlook still doesn’t include an automatic archive feature to move messages of a certain age to an archive folder. However, Exchange and Office 365 include a server-side feature to do this. An administrator must enable archiving and set the rules. Once set, a weekly process runs to move messages to an online archive location, preserving the folder hierarchy of the archived messages.

Online archives act like a separate mail account where only headers are downloaded to display the senders and receivers of messages along with the subject line. Once a message is selected, Outlook downloads the message body and displays it. This keeps old messages on the server and off the computer but readily accessible so long as the Mac is online.

Outlook automatically connects to the Online Archive folder. To access it, just scroll to the “Online Archive – Account Name” folder in the account list in the left navigation pane.

Online Archive

Calendar

Apart from appearance changes, the calendar does include one new feature, which is local weather at the top right corner of the window. By default, it relies on OS X’s Date & Time settings to determine the local city, but the user can manually choose to display weather for a specific city.

Calendar weather

What’s changed?

That’s what’s new. What’s different about Outlook 15 and what features are changed?

Appearance

Outlook sports Microsoft’s blue and white color scheme used across current Outlook products including Outlook Web App (OWA) for Exchange and Office 365 and Outlook.com, Microsoft’s free email service. Compare Outlook, OWA and Outlook.com:

Outlook 15 Blue & White OWA Blue & White Outlook.com Blue & White

The message list also sees a slight makeover, placing emphasis on people rather than subject and includes a single-line message preview for messages already downloaded. Compare a message list item in Outlook 15 with Outlook 2011:

Outlook 15 message list item

Outlook 15 message list item

2014-11-02_14-14-09

Outlook 2011 message list item

Categories

Categories aren’t new to Outlook but syncing category names and colors to Exchange and Office 365 is new. Choose Message > Categories > Edit Categories in Outlook and Exchange categories now appear as a separate list.

Exchange Categories

That list in Outlook corresponds to categories displayed in OWA or other compatible Exchange or Office 365 mail clients.

Exchange and Office 365 Categories

Conversations

Outlook 2011 had a basic method for sorting messages within the same thread by subject and grouping them together as Conversations. While this worked well for the most part, it had unexpected consequences such as grouping unrelated messages together when they had the same or no subject line.

Outlook now uses conversation and message ID mail headers to group messages. This displays related messages together and has the potential to display related messages across multiple folders. Mailing lists that don’t include these headers in their messages stand to be very difficult to follow in Outlook. When sorting by Conversation, Outlook will simply display messages by timestamp without sorting because it will see every message as an individual conversation.

Update: Exchange push

Like Entourage 2008 and Outlook 2011, Outlook 15 connects to Exchange using the Exchange Web Services (EWS) protocol. One disadvantage with the protocol was Microsoft had to program the applications to check for new messages about every minute. Because of this, end-users often noticed a delay between the time they received a message on a mobile device and on the desktop. They perceived this as Entourage or Outlooking being “slow”.

Exchange 2013 and Office 365 end-users benefit from “push” notifications with Outlook 15. Outlook 15 should now notify end-users as soon as new messages arrive on the server.

Notifications

Outlook utilizes OS X’s Notifications feature to display banner alerts for incoming mail. Similar to Outlook 2011, notifications only display when the application is in the background.

Notifications

To review recent notifications, open the Notification Center by clicking its icon in the upper right corner of the screen.

Notification Center

Send-a-Smile

Internally, Microsoft has used its Send-a-Smile tool to enable testers of its products to quickly send feedback about its products. In Outlook 15 it has moved the Help > Send Feedback tool, which use to direct a user to a web page, to a smiley face in the upper right corner of the application’s main window where he can choose either “Tell Us What You Like…” or “Tell Us What Can Be Better…”

Send-a-Smile

The tool then opens a simple feedback window that includes a screenshot of the current application window. The user can enter his comment and optionally include the screenshot and his email address when sending the report.

Feedback window

Signatures

Like Categories, signatures are not new to Outlook but Microsoft added a couple highly requested features. Signatures now change as the user changes the sending account in the From drop down menu of a mail message and the user can set independent signatures for new messages and replies/forwards.

To create a signature and assign it to an account, choose Outlook > Preferences > Signatures. Create the signatures in the top portion of the window and then assign signatures to accounts in the bottom portion of the window.

Edit signatures

Choose a different account in the From drop down menu of a new mail message and the signature changes to the signature of the second account.

Old signature  New signature

What’s gone?

Some features are now gone from Outlook 15. Certain features were deprecated while others may have been omitted due to development constraints. Microsoft has made no announcements about missing features or whether they will be returning in future builds.

AppleScript menu

The AppleScript menu no longer appears to the right of the Help menu. AppleScript support is not missing from the application, however, it now has no way of enabling a user to invoke scripts without leaving the application and double-clicking the scripts or running the AppleScript Editor or using a third party tool.

Update: Because of Outlook’s new sandboxed architecture, some AppleScripts may no longer work as expected. For example, an AppleScript called by a rule in Outlook to copy the text of a message can open Microsoft Word (an non-sandboxed application) and paste the content, however, it cannot call TextEdit (a sandboxed application) and paste the content there.

Also, Outlook 15 does not include Automator actions.

Import/Export

Outlook 15 only supports importing from Outlook 2011, an Outlook 2011 archive (.olm file) or Windows personal folder (PST). It no longer supports importing or upgrading from Microsoft Entourage and no longer supports importing a text file for contacts.

The ability to export to an Outlook archive file is completely gone. Dragging and dropping a mail folder from the Outlook window into the Finder, though, does still export that folder and its contents to a .mbox archive file. This is a one-way operation as of version 15.3 with no way to then return that .mbox archive to Outlook.

Junk E-mail Protection

Microsoft has removed junk e-mail protection from the product leaving only a Safe Senders and Blocked Senders list for in-application junk protection. It recommends junk e-mail protection be handled at the server level.

Update: Junk E-mail Protection is turned off only for Exchange 2013 and Office 365 accounts. It still functions for POP, IMAP and Exchange 2010 and lower.

My Day

The stand-alone task manager application that debuted in Entourage 2008 and continued in Outlook 2011 is not included.

Schedules

Schedules controlled the timing for Send/Receive functions as well as routine maintenance such as emptying Deleted Items folders at specified times of the day or sending all waiting mail when Outlook was quit.

Microsoft moved schedules for POP accounts to within the individual account settings themselves.

Send/Receive

With schedules moved into individual accounts, the Send/Receive command no longer enables the user to Send/Receive for just one account. Invoking the command is now all or nothing.

Sync Services

Apple deprecated Sync Services around OS X 10.7 and removed it completely in OS X 10.9. Microsoft did not include support for legacy OS customers.

What now?

Outlook 15’s release was a surprise, especially with customers awaiting an overdue full Office for Mac suite. Microsoft was also clearly targeting its Exchange and Office 365 audience by including features that work only with these products lines.

Another surprise was Microsoft’s announcement on its Office Blogs site that it would release a public beta of its next Office for Mac suite in the first half of 2015. That’s something it has done with products for Windows but never with any of its Mac products. And it explicitly stated the final release of the next version would be sold as both a subscription and perpetual license.

This version of Outlook seems to be testing the waters for future software releases and may be indicative of Microsoft’s approach that its Office 365 subscribers, who are its more profitable customers, will be the first to receive anything new. It’s dangling a carrot to entice more customers to its online platform.

AppleScriptTask in Office 2016 for the Mac

$
0
0

AppleScriptTask in Office 2016 for the Mac

In Office 2011 for the Mac there are many problems with the built-in VBA commands. For Example Dir, Kill, GetOpenFilename, GetSaveAsFileName and many others. For examplein Office 2011 file names in VBA are limited to a maximum of 32 characters including the extension. If the file name is longer the code fails.

VBA developers responded by using AppleScript in many situations to work around the problems. They also used AppleScript to do things that are not possible with VBA code; for example to email using VBA code, Excel 2011 and Outlook 2011.

In Office 2016, we need to use a new method and a new approach explained below.

Continue reading on Ron de Bruin’s Excel Automation site.

Viewing all 11 articles
Browse latest View live