How to use AutoExec macro - Page 3


"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
  #21  
Unread 10th December 2014, 20:15
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! ------


Hi, Macropod

I'm sorry, I forgot to write code.
I just started using VBA in Word so I can not write more like this (attachment). My idea is:

Paragraph 1, 2 and 3 is the customer; ROW1 of Table 1 is the asset
if condition1 = n ---> n customers created
if condition2 = n ---> n assets created

Hope you help me , please !
Attached Files To view attachments in this forum your post count must be 2 or greater. You currently have 0 posts.

The Code Cage Advertisment
Advertisement

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

  #22  
Unread 11th December 2014, 00:10
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! ------


I still have no real idea of what you're trying to achieve. On the one hand, you talk about mailmerge, but then you talk about macros. It seems you may be trying to create a merge that outputs a document with varying numbers of records per group. You can use Word's Catalogue/Directory Mailmerge facility for this (the terminology depends on the Word version), without the need for macros. To see how to do so with any mailmerge data source supported by Word, check out my Microsoft Word Catalogue/Directory Mailmerge Tutorial at:
http://windowssecrets.com/forums/sho...merge-Tutorial
or:
http://www.gmayor.com/Zips/Catalogue%20Mailmerge.zip
The tutorial covers everything from list creation to the insertion & calculation of values in multi-record tables in letters. Do read the tutorial before trying to use the mailmerge document included with it.

For some worked examples, see the attachments to the posts at:
http://www.msofficeforums.com/mail-m...html#post23345
http://www.msofficeforums.com/mail-m...html#post30327
http://windowssecrets.com/forums/sho...l=1#post928391
__________________
Cheers,
Paul Edstein
[MS MVP - Word]

The Following User Says Thank You to macropod For This Useful Post:
Simon Lloyd (14th December 2014)
  #23  
Unread 14th December 2014, 09:14
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! ------


You 're right . I use mail merge to create a new Word file. I use vba to work faster.


In this word File, how to move the cursor to where you want to paste the text ? How to insert Word Field ‘Next Record’ at that position.


In addition to the reference to a merge field (For example: condition1 and condition2) we have to write how the path is correct ?


Last edited by xuhathdo; 14th December 2014 at 10:59.
  #24  
Unread 14th December 2014, 13: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! ------


If you create your file, add the fields, etc. where you need them to be, and save it as a template, you don't need to use code to insert the fields or other content each time. Simply create a new document using the template. Alternatively, you could just save the file as an ordinary document and open it each time. Either arrangement is much easier to maintain than something that's hard-coded in VBA.
__________________
Cheers,
Paul Edstein
[MS MVP - Word]

The Code Cage Advertisment
Advertisement

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

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 18:05.


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