automation

How to retrive Outlook default signature

The Outlook signatures are stored in the %APPDATA%\Microsoft\Signatures\ folder in text, RTF and HTML formats.
In case of multiple signatures, the default can be found through Word automation. Tested in Outlook 2003 and later.

Deleting pages from PDF file through Acrobat automation

Detailed info on Acrobat automation can be found in Interapplication Communication API Reference from Acrobat 8.1 SDK or Acrobat 9.0 SDK at http://www.adobe.com/devnet/acrobat/?navID=downloads. Free registration may be required.

Document Properties in Microsoft Office Word and Excel

Document properties, both built-in and custom, are a Microsoft Office-wide feature. The Word 2003 and Microsoft Office Excel expose document properties and provide the same way to work with them. These properties provide a powerful way to add and track specific information for a document.

Outlook - Add Color Coding to Calendar Items

The Outlook model doesn't provide access to the Label property, but it can be retrieved/changed via CDO 1.21.
Requires Outlook 2002 or later. Tested with Outlook 2003 only.
Based on http://www.outlookcode.com/codedetail.aspx?id=139

$SAMPLECODE$

* FUNCTION SetApptColorLabel
* toAppointment - Appointment object to change label/color for
* tnColor - Label/Color to assign
LPARAMETERS toAppointment, tnColor

Fit to Page in Excel and Word

$SAMPLECODE$

Excel
WITH oSheet.PageSetup
* Fit to Page
.Zoom = .F.
.FitToPagesWide = 1
.FitToPagesTall = 1
ENDWITH

*------------------------------------

* Word
oWord.ActiveDocument.FitToPages()

Excel - Finding the Last Row, Column or Cell

$SAMPLECODE$

#DEFINE xlA1 1
#DEFINE xlR1C1 -4150
#DEFINE xlLastCell 11

* Last Row/Column
lnLastRow = oSheet.UsedRange.Rows.Count
lnLastCol = oSheet.UsedRange.Columns.Count

* Last Cell - Intersection of the last row and the last column
lcLastCell = oSheet.Cells.SpecialCells(xlLastCell).Address(,,xlR1C1)

Subscribe to RSS - automation