How to use AutoExec macro - Page 2


"Excel VBA Help"

 


Play Friv Now - Play Friv Games
Go Back   The Code Cage Forums > Microsoft Topics > Microsoft Word Forum
Our Info Pages:-
The Code Cage - Microsoft Office help

Notices

Microsoft Word Forum Members, post questions in this forum if they are related to using Microsoft Word, this includes Document Properties, VBA Programming & Functionality etc.

New Reply
Thread Tools Rate Thread Display Modes
  #11  
Unread 1st December 2014, 06:20
macropod's Avatar
macropod macropod is offline
Solution Centre Professional
MS Office Version: MS Office 2000, 2003 & 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 172
Posts Per Day: 0.07
My Top Tip Count: 0
Thanks to others: 0
Thanked 20 Times in 20 Posts
Reputation: 380 (11) macropod is just really nicemacropod is just really nicemacropod is just really nicemacropod is just really nice
Australia
Default Re: How to use AutoExec macro


------ Register to get rid of these "In Post" ads! ------


Quote:
Originally Posted by RoyUK View Post

As far as I am aware an AutoExec macro runs at start up so the end result is pretty much the same.

A fairly fundamental difference is that an AutoExec macro can be used to load keybindings, etc. before any documents have been opened (e.g. to assign keyboard shortcuts). Neither a Document_Open macro nor an AutoOpen macro can do that.

Quote:
Originally Posted by Jack in the UK View Post

AutoExec AutoExec.exe is a M$ Windows file that run for all sorts of start-up process
...
In M$ Excel we use
...
I do not think you will solve this in the way You are hoping

I think you've missed the point entirely.

The discussion is about AutoExec macros in Word. This has nothing to do with auto files in Excel or with Windows start-up processes. Furthermore, the "M$ Windows file that run for all sorts of start-up process" to which you refer is not AutoExec.exe - it's a DOS batch file named AutoExec.bat. Indeed, there is no Windows file named AutoExec.exe.

The OP's certainly not going to solve anything by relying on irrelevant and inaccurate posts about Excel and Windows...
__________________
Cheers,
Paul Edstein
[MS MVP - Word]

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!

  #12  
Unread 2nd December 2014, 08:01
RoyUK's Avatar
RoyUK RoyUK is offline
Administrator
Solution Centre Professional
MS Office Version: MS Office 2003, 2007, 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Nov 2008
Location: Derbyshire, UK
Posts: 2,706
Posts Per Day: 0.86
My Top Tip Count: 4
Thanks to others: 2
Thanked 195 Times in 193 Posts
Reputation: 3320 (69) RoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond reputeRoyUK has a reputation beyond repute
4 Top Tips
England
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


So enlighten as to why the macro is not running for the OP. The link I provided does at least explain how to set the different macros up.
__________________
Hope that helps, RoyUK
For tips & examples visit free excel help
DatabaseForm
About me

The Code Cage Advertisment
Advertisement
  #13  
Unread 2nd December 2014, 08:17
macropod's Avatar
macropod macropod is offline
Solution Centre Professional
MS Office Version: MS Office 2000, 2003 & 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 172
Posts Per Day: 0.07
My Top Tip Count: 0
Thanks to others: 0
Thanked 20 Times in 20 Posts
Reputation: 380 (11) macropod is just really nicemacropod is just really nicemacropod is just really nicemacropod is just really nice
Australia
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


Quote:
Originally Posted by RoyUK View Post

So enlighten as to why the macro is not running for the OP.

As I replied in post #2:
Quote:
Originally Posted by macropod View Post

You haven't provided enough details about how you're trying to use this for anyone to provide meaningful advice. For general advice, see: http://msdn.microsoft.com/en-us/libr...ffice.11).aspx

__________________
Cheers,
Paul Edstein
[MS MVP - Word]

  #14  
Unread 2nd December 2014, 11:49
Jack in the UK's Avatar
Jack in the UK Jack in the UK is offline
The Code Cage Staff
MS Office Version: MS Office 97, 2003, 2007,2010
MS Office Skill Level: Proficient with Excel
 
Join Date: Dec 2011
Location: England
Posts: 545
Posts Per Day: 0.28
My Top Tip Count: 0
Thanks to others: 3
Thanked 43 Times in 43 Posts
Reputation: 570 (16) Jack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to all
England
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


@macropod true its BAT not exe, my point is always to educate, autoxxxx are from M$ Win files and understand them and your understand why the OP can not do as she wishes, ok so the fix has been given in Excel terms

My aim was to basic the outline of what does what and when, which I read is what Lisa is trying t perform, run code prior to excel opening as it setups and other thing computers can do ie Excel stuff, such as the autoexec.bat file can do, we all used to edit and write all then years ago to do what we wanted

This was my point, understanding processes over codes, lean the way things are over code, then you know where, when and how to code what you require

In truth most prob a capture event to stall Excel opening is required, once open and scripts run will be the best performance and way to go, saying that PowerShell or VBS are outside the VBIDE and thats something i do not promote as the VBIDE should cover most needs for most users

Other than that I am clean out of ideas

Again sorry for saying *.exe instead of *.bat

rdgs
jiuk
__________________
VBA CODE:
Regards, 
Jack In the UK 

  #15  
Unread 2nd December 2014, 11:59
macropod's Avatar
macropod macropod is offline
Solution Centre Professional
MS Office Version: MS Office 2000, 2003 & 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 172
Posts Per Day: 0.07
My Top Tip Count: 0
Thanks to others: 0
Thanked 20 Times in 20 Posts
Reputation: 380 (11) macropod is just really nicemacropod is just really nicemacropod is just really nicemacropod is just really nice
Australia
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


Hi Jack,

As has already been said multiple times now, the issue has nothing to do with Excel. The thread is about a Word macro and has been posted in the Word forum.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!

  #16  
Unread 2nd December 2014, 22:58
Jack in the UK's Avatar
Jack in the UK Jack in the UK is offline
The Code Cage Staff
MS Office Version: MS Office 97, 2003, 2007,2010
MS Office Skill Level: Proficient with Excel
 
Join Date: Dec 2011
Location: England
Posts: 545
Posts Per Day: 0.28
My Top Tip Count: 0
Thanks to others: 3
Thanked 43 Times in 43 Posts
Reputation: 570 (16) Jack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to all
England
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


YES the VBIDE is still in word - right?
So the Excel vs Word is the same - its not that difficult to understand .........

What I have said about Excel above carries over to Word, Access is different of cause and it required 'spells and wizardry' on load, install , open for the DBs to work correctly and have it built in, thus what I am trying to explain

My advise is spot on ...
__________________
VBA CODE:
Regards, 
Jack In the UK 

  #17  
Unread 3rd December 2014, 00:09
macropod's Avatar
macropod macropod is offline
Solution Centre Professional
MS Office Version: MS Office 2000, 2003 & 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 172
Posts Per Day: 0.07
My Top Tip Count: 0
Thanks to others: 0
Thanked 20 Times in 20 Posts
Reputation: 380 (11) macropod is just really nicemacropod is just really nicemacropod is just really nicemacropod is just really nice
Australia
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


Quote:
Originally Posted by Jack in the UK View Post

YES the VBIDE is still in word - right?
So the Excel vs Word is the same - its not that difficult to understand .........

What I have said about Excel above carries over to Word, Access is different of cause and it required 'spells and wizardry' on load, install , open for the DBs to work correctly and have it built in, thus what I am trying to explain

My advise is spot on ...

Your advice is nonsense. Word VBA and Excel VBA are entirely different.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]

  #18  
Unread 3rd December 2014, 19:28
Jack in the UK's Avatar
Jack in the UK Jack in the UK is offline
The Code Cage Staff
MS Office Version: MS Office 97, 2003, 2007,2010
MS Office Skill Level: Proficient with Excel
 
Join Date: Dec 2011
Location: England
Posts: 545
Posts Per Day: 0.28
My Top Tip Count: 0
Thanks to others: 3
Thanked 43 Times in 43 Posts
Reputation: 570 (16) Jack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to allJack in the UK is a name known to all
England
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


@macropod

Leave you to solve the question Lisa, You are better placed to fully solve this question, thank you and for Your kindness helping Lisa solve this

Regards
jiuk
__________________
VBA CODE:
Regards, 
Jack In the UK 

The Code Cage Advertisment
Advertisement

To stop seeing these ads and get other benefits check This page!

  #19  
Unread 8th December 2014, 19:42
xuhathdo's Avatar
xuhathdo xuhathdo is offline
Junior Member
MS Office Version: MS Office 2003
MS Office Skill Level: New to Access
 
Join Date: Apr 2014
Location: An Giang, Vietnam
Age: 32
Posts: 5
Posts Per Day: 0.00
My Top Tip Count: 0
Thanks to others: 0
Thanked 0 Times in 0 Posts
Reputation: 10 (4) xuhathdo is on a distinguished road
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


I use the word file (Word 2003) to create customer profiles by means of MailMerge.
Its data is taken from one access file. I want every time I open the word file, it runs automatically copy and paste depends on a number of conditions that I made. I attach this files.

If condition1 is 2 and condition2 is 4 then copy the first, second and third paragraph and then paste under third paragraph, four times using the command Insert Word Field <<next record>> to get second customer (Yellow). We have 2 customers;

Also copy the 2nd row of the table, paste three times bottom row 2. Then use the next thing before each row pasted record. Thus we have 4 Assets.

It's too complicated so I split it out to accomplish. First I need to run automatically when you open the word. Then I made the above work.

However, this part of the code I have not yet been written, I wish to help !
Attached Files To view attachments in this forum your post count must be 2 or greater. You currently have 0 posts.

  #20  
Unread 8th December 2014, 22:08
macropod's Avatar
macropod macropod is offline
Solution Centre Professional
MS Office Version: MS Office 2000, 2003 & 2010
MS Office Skill Level: Proficient with MS Office
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 172
Posts Per Day: 0.07
My Top Tip Count: 0
Thanks to others: 0
Thanked 20 Times in 20 Posts
Reputation: 380 (11) macropod is just really nicemacropod is just really nicemacropod is just really nicemacropod is just really nice
Australia
Default Re: How to use AutoExec macro

------ Register to get rid of these "In Post" ads! ------


If you want a macro to run automatically when you open a document, use a Document_Open macro in that document's 'This Document' code module, or an AutoOpen macro in an ordinary code module. As for the document included in your attachment, it contains no macros of any kind; neither does it contain any field coding that might do what you say you're trying to achieve.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]

The Code Cage Advertisment
Advertisement
New Reply
The Code Cage at Facebookhe Code Cage at Twitter


Tags
autoexec, macro

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

The Code Cage Affilliates



http://www.thecodecage.com/forumz tested by McAfee Security http://www.thecodecage.com/forumz tested by McAfee Security

All times are GMT +1. The time now is 10:13.


Powered by vBulletin® Version 3.8.6
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Template-Modifications by TMS
No part of this board, functionality or creatives may be copied or reproduced either in part or full without the express permission of The Code Cage Team.
Copyright ©2008 - , Simon lloyd.
We are not associated with nor employed by Microsoft in any way, we simply provide resources!
All MS office icons are registered trademarks of the application they represent and are used with permission from Microsoft
UA-8135493-1
Cultural Forum | Study at Malaysian University