Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-07-2013, 02:30 PM
kveldulv kveldulv is offline Auto Update Fields Macro Windows 7 32bit Auto Update Fields Macro Office 2010 32bit
Novice
Auto Update Fields Macro
 
Join Date: Jun 2013
Posts: 1
kveldulv is on a distinguished road
Default Auto Update Fields Macro

Hey guys I am new to all the macros so please understand I am going into this small project completely blind. The issue I am having is as follows;

We use a Hotel software program that automatically generates the Deposit price in an email and we use outlook. The field reference is not a numerical value it is {DEPREQ} (Accu Cobal program) in which case on generating the email using an HTML template it populates the field text area {DEPREQ} with the numerical value listed in the system.

Here is the problem, the program doesn't populate values for Balance due or Total of reservations and we keep having guests call us for this information. We tried to make it simple by having the deposit 25% of total but guests can't seem to figure out how to use a calculator.

What i am attempting to accomplish is a formula like excel by =SUM(B5)*4 (This will calculate the total reservation cost) and =SUM(B5)*3 (this calculates the balance due). These formulas work both in Word and Outlook, the issue is that they do not auto update and attempting to train employees who have a hard enough time finding the power button on a computer just is not going to work so i have been playing with macros to try to get the fields to auto update at opening of the email.

The following macro works in Word but does NOT work in Outlook
Quote:
Sub AutoOpen()
'
' AutoOpen Macro
'
'

Dim aStory As Range
Dim aField As Field

For Each aStory In ActiveDocument.StoryRanges



For Each aField In aStory.Fields
aField.Update
Next aField

Next aStory

End Sub
I have references the VBA to Word 14.0 and the Compile error went away now it doesn't work nor generate any new errors.

What am I doing wrong?
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto Update Fields Macro macro to update fields PeaceDove Word 3 01-17-2012 02:45 PM
Auto Update Fields Macro Update all fields with single command? carrfamily@mindspring.com Word 2 05-05-2011 05:01 PM
Macro to update fields rhatx Word VBA 0 03-02-2011 12:14 PM
VBA to update certain (but not all) fields sparkyrose Word VBA 0 05-20-2010 12:50 PM
Can no longer update fields! slindsay Word 0 09-03-2009 05:10 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:14 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft