Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Jul 2005
    Location
    Manassas, Virginia, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Word / Excel Macros (Office Suite 2003)

    My firm had a Word template being used to full out Travel Expense Report. I create a new template for us in Excel. The managing partner took things a step further and wants the following:

    For the custom firm menu settings in Word to redirect and open the Excel template. In his scenario, a user working in Word would go to the drop down menu, select the listing for Travel Expenses and Word would then open Excel and the new Travel Expense Report template.

    Any idea?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Word / Excel Macros (Office Suite 2003)

    <P ID="edit" class=small>(Edited by jscher2000 on 21-Sep-06 21:54. )</P>If Word does not need to instruct Excel to do anything with the other document, or to communicate with it after opening, you have three options:

    (1) FollowHyperlink filename
    (2) Shell filename
    (3) Automation (e.g., Set xlApp = CreateObject(Excel.Application); xlApp.Workbooks.Open; etc.)

    If you want Word to pass data to Excel, only the third method is relevant.

    I realize that's extremely cryptic, but if you paste that into the VB Editor and highlight the bold part and press F1, you will get some additional help.

    Of course there are lots of examples here in the Lounge, too.

    Added: After you get the macro working to open the Excel file, you can add it to a menu/toolbar. It sounds as though you might already have a global template in which to host all of this.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •