Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. use word macro

use word macro

Scheduled Pinned Locked Moved Visual Basic
questiondatabase
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    danidanidani
    wrote on last edited by
    #1

    How can I call a word macro when the document is loaded? (I cannot save it in the document) I tried with command line param but then it tried to run the macro before the document is loaded. Also saved it in the normal.dot template but I don't have a trigger to call it Dani

    E 1 Reply Last reply
    0
    • D danidanidani

      How can I call a word macro when the document is loaded? (I cannot save it in the document) I tried with command line param but then it tried to run the macro before the document is loaded. Also saved it in the normal.dot template but I don't have a trigger to call it Dani

      E Offline
      E Offline
      Eric Dahlvang
      wrote on last edited by
      #2

      In Word help you will find Run a macro On the Tools menu, point to Macro, and then click Macros. In the Macro name box, click the name of the macro you want to run. If the macro doesn't appear in the list, select a different document, template, or list in the Macros in box. Click Run. But I like to add a button to the toolbar and have it run the macro: Add a button to a toolbar Show the toolbar you want to add a button to. On the Tools menu, click Customize, and then click the Commands tab. In the Categories box, click a category for the command you want the button to perform. Drag the command or macro you want from the Commands box to the displayed toolbar. If you don't see the command you want under a particular category, click All Commands in the Categories box. Tip To quickly add a built-in button to a built-in toolbar, click More Buttons on a docked toolbar, (or click the arrow in the upper-left corner of a floating toolbar), click Add or Remove Buttons and then select the check box next to the button you want to add. Eric Dahlvang-Programmer

      D 1 Reply Last reply
      0
      • E Eric Dahlvang

        In Word help you will find Run a macro On the Tools menu, point to Macro, and then click Macros. In the Macro name box, click the name of the macro you want to run. If the macro doesn't appear in the list, select a different document, template, or list in the Macros in box. Click Run. But I like to add a button to the toolbar and have it run the macro: Add a button to a toolbar Show the toolbar you want to add a button to. On the Tools menu, click Customize, and then click the Commands tab. In the Categories box, click a category for the command you want the button to perform. Drag the command or macro you want from the Commands box to the displayed toolbar. If you don't see the command you want under a particular category, click All Commands in the Categories box. Tip To quickly add a built-in button to a built-in toolbar, click More Buttons on a docked toolbar, (or click the arrow in the upper-left corner of a floating toolbar), click Add or Remove Buttons and then select the check box next to the button you want to add. Eric Dahlvang-Programmer

        D Offline
        D Offline
        danidanidani
        wrote on last edited by
        #3

        I am afraid this isn't the exact solution. THe thing is, I need to embed this in my application so that it is transparent for the user (from an intranet web application I launch word through havascript to open a dynamic XML from a web service and an XSL to build the document - HTML). I don't want the user to interact at all (needs to be fully automatic) and it needs to be triggered right after the document loads.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups