Fax Cover Sheet Macro - Date Field does not pick up system time

Posted on 2006-04-28
Last Modified: 2010-04-08
BlueDevilFan answered my original question of "How to create a fax cover sheet in contacts by creating a macro"  This macro works great.  I have a problem with the date field it picks up 3/4/2006 every time instead of the current date.  I've looked through the faxcoversheet.txt document and I can't even find the line that refers to the field.  Please note my experience with macros is nil.  Any help would be appreciated.

Question by:averbeck
    LVL 76

    Expert Comment

    by:David Lee
    Greetings, averbeck.

    Filling the date isn't handled by the macro.  It's litteral text typed into the page.  I can adjust that if you want so that the macro does handle it.  

    As a side note, you should close the original question.  It's still open.


    Author Comment

    I would appreciate the adjustment

    LVL 76

    Accepted Solution

    No problem.  This should do it.

    1.  Open the fax cover sheet HTML file, do a search on 3/4/2006 and replace it with *TODAYS_DATE*
    2.  Add the following code to the macro.  Insert it immediately before the line containing "objMyFaxCover.WriteLine strBuffer".

            If InStr(1, strBuffer, "*TODAYS_DATE*") Then
                strBuffer = Replace(strBuffer, "*TODAYS_DATE*", Date)
            End If


    Author Comment

    This did it.  Do you have any recommendations on a book I could pick up that would walk me through creating macros?  Thanks for all your help.

    LVL 76

    Expert Comment

    by:David Lee
    You're welcome.  I've three books I depend on for the specifics of writing macros for Outlook/Exchange.

    1.  Microsoft Outlook Programming, Sue Mosher, Digital Press, ISBN: 1-55558-286-9
    2.  Programming Microsoft Outlook and Microsoft Exchange 2003, Thomas Rizzo, Microsoft Press, ISBN: 0-7356-1464-4
    3.  Building Applications with Microsoft Outlook 2000 Technical Reference, Randy Byrne, Microsoft Press, ISBN: 0-7356-0581-5  (There's a newer version of this book for Outlook 2002.  Not sure about 2003.  I've not seen one, but I may simply have missed noticing it.)

    Note that I said I use these references for the specifics of writing macros for Outlook.  They don't teach basic coding skills which is as important to the process as knowing what Outlook object does what, or what method to call to accomplish something.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Email signatures have numerous marketing benefits. Here are 8 top reasons to turn your email signature into a marketing channel.
    Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
    Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    23 Experts available now in Live!

    Get 1:1 Help Now