Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Oct 2004
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Taskpane shortcut actions (word 2003 sp1)

    Is there anyway i can get the action below to run a macro? rather than msofilenew etc

    Application.NewDocument.Add FileName:="C:myFile.dot", Section:=msoNewfromExistingFile, DisplayName:="My File", Action:="Run_my_Macro"

    I've tried "shell winword etc" but that only causes problems with normal.dot being opened twice.
    You can put in your macro, but you get an "expected function or variable" error when you try it.

    Thanks for any advice
    Matt

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Taskpane shortcut actions (word 2003 sp1)

    The Action argument can only be one of the MsoFileNewAction constants, not a custom value. Why don't you call the macro in the Document_New event procedure in MyFile.dot?

Posting Permissions

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