How can I update all fields in a document?

I have a AutoNew() macro which sets some custom properties which are
displayed in my template text in the body and header of the document.
When the macro ends, the field values are not current.  Is there a way
to update all fields?
0
Chris
11/13/2009 4:08:24 PM
word.vba.general 1023 articles. 1 followers. Follow

2 Replies
1281 Views

Similar Articles

[PageSpeed] 55

You can do it by toggling to and from print preview (provided update fields 
is set to run on printing) or use the myupdatefields macro at this link:

http://gregmaxey.mvps.org/Field_Macros.htm

Chris Nelson wrote:
> I have a AutoNew() macro which sets some custom properties which are
> displayed in my template text in the body and header of the document.
> When the macro ends, the field values are not current.  Is there a way
> to update all fields? 


0
Greg
11/13/2009 6:00:40 PM
> > I have a AutoNew() macro which sets some custom properties which are
> > displayed in my template text in the body and header of the document.
> > When the macro ends, the field values are not current.  Is there a way
> > to update all fields?
>
> You can do it by toggling to and from print preview (provided update fields
> is set to run on printing) or use the myupdatefields macro at this link:
>
> http://gregmaxey.mvps.org/Field_Macros.htm

Perfect!  Thanks.
0
Chris
11/13/2009 6:38:58 PM
Reply:

Similar Artilces:

How can I open a file saved in Pub 2000 version 6 in Pub 2000 ver.
The file is saved in Publisher 2000 v6 and I am trying to open it with Publisher 2000 v9. can this be done? Hi LaTrice (LaTrice @discussions.microsoft.com), in the newsgroups you posted: || The file is saved in Publisher 2000 v6 and I am trying to open it || with Publisher 2000 v9. can this be done? No. There is no such thing as Publisher 2000 v9, nor is there a version 9 of Publisher, yet. Verify the version of Publisher that you have, and also verify the version of Publisher that you received the file from then post back. -- Brian Kvalheim Microsoft Publisher MVP http://www.publi...

windows update 04-15-10
I am running windows vista on a MAC computer with VMWare Fusion. I cannot get the service pack 1 or internet explorer 8 update to run. i get error code 490 and 800704090 Too late now! Support for Vista Gold (no Service Packs) ended on Tuesday, 13 April 2010! Computers running Vista Gold "will no longer receive software updates from Windows Update" until SP1 has been manually installed (which will require several Prerequisite Updates to be installed first). See http://windowsteamblog.com/blogs/windowsvista/archive/2010/04/13/end-of-support-for-windows-vista-with-no...

Can't use Merge feature
If I have a postcard file I've already made on the screen, when I try to pull up the "Merge" feature under Tools, it is shaded grey and I can't open it. It insists that I either form a new database list of addresses or edit the one that I want to merge. I don't want to edit the one I want to merge. I just want to MERGE it. If, however, I have just a postcard template on the screen (without it having been made into anything), I CAN pull up the "merge" feature under Tools. It is not shaded out. How do I un-shade the "merge" feature? To merg...

Numbers in a text field-can I add them up?
Hi everyone! Using A02 on XP. I have a table of data with survey response fields that contain a 0,1,2,3,4 or 5. However, the fields are formatted as text, not numbers. I need to add up certain blocks (Items 1-6, Items 7-23, etc.) and then do some averaging. I cannot change the field types from text. Must I append to a new table or can I do something right in my query? I've got one field in my query like this: ES: [Item1]+[Item2]+[Item3]+[Item4]+[Item5]+[Item6] My result is: 553453 or 554444, etc. I want: 25 or 22, etc. I would really appreciate any help or advice. Thanks...

Ho to make one field required based on critera of another field?
I'm creating a form and need to make the "comments" field required if the "code" field is =>20. I appreciate suggestions! Deadline Monster is lurking! User enters the job processing endcode value (numeric) into the "code" field. If the endcode is =>20, comments are required. (P.S. I don't know VB) Thanks! Star You would put your validation code in the Form's BeforeUpdate event. If Me.EndCode >19 Then If Len(Me.Comments & "") = 0 Then MsgBox "Comments are required" Cancel = True End If End If ...

data value in Form field if no table entry
I have a form with a field which pulls through and concentenates 2 fields called [ContactFirstname] and [ContactLastName]from my table There are however some customers for whom I do not have names and therefore instead I would like Sir/Madam to appear in the field in the form I think I have seen this done somewhere using ELSE? but can't find it Any help/ideas gratefully received Perhaps something like this: Nz(Trim([ContactFirstname] & " " + [ContactLastName]), "Sir/Madam") -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access use...

Change outbound server in header to fix 550 Can't verify your host name error
The headers on the outbound emails show the internal DNS name of our exchange server; obviously this won't resolve properly at the destination. How/where in Exchange 5.5 can I force the IMC to use a real fqdn on outbound mail? Thanks! Frinky You can do this in TCP/IP properties\Advanced\DNS tab of machine. And yes, this is not just for Exchange, so you may consider forwarding all outgoing mail to some relay server (your firewall or ISP's server). Professor Frink wrote: > The headers on the outbound emails show the internal DNS name of our > exchange server; obviously this...

Constructing Hyperlink from the Database Record fields
I am working on a Windows XP environment using MS Office 2007 including Access 2007. I want to open a document from Access 2007 which I can easily do with Hyperlink type field. However since all the necessary information is already in the Database Record I try to avoid creating additional field which would be a Hyperlink type on the Form unless it is absolutely necessary. Below is the code that I have to construct the FullFileName which consisted of ServerName, Division, Unit, RequirementDirectory, FolderName and the FileName itself. As you can see the Database records has al...

How can I tell if an email I have sent has been opened?
As per subject. You can try using a Read Receipt but many users block the return of them "AT" <AT@discussions.microsoft.com> wrote in message news:616E8A17-880A-46F9-9E6D-041484DA54E1@microsoft.com... > As per subject. you pay for it: http://www.readnotify.com/ you can try it out for a short time...then you pay...but it's pretty much guaranteed to get you the results you want... "AT" <AT@discussions.microsoft.com> wrote in message news:616E8A17-880A-46F9-9E6D-041484DA54E1@microsoft.com... > As per subject. Request a read receipt. But- it...

can you tell me what an error 920 is?
I'm trying to save a visio file out as a jpeg, or gif, or png. I keep getting the error with no explanation of what the error means - any help is appreciated You can go to the following link and it explains the issue you are having and how to fix it: http://support.microsoft.com/default.aspx?kbid=295691 "Julie" wrote: > I'm trying to save a visio file out as a jpeg, or gif, or png. I keep > getting the error with no explanation of what the error means - any help is > appreciated > > > ...

can you see what i am writting?
...

How do I create a bookfold document in Word 2007?
I am new to Word 2007. How do I create a document in booklet form? Thanks I'm sure you'll get better answers in an MSWord forum. dadolim wrote: > > I am new to Word 2007. How do I create a document in booklet form? Thanks -- Dave Peterson ...

How can I choose alternate rows in a column?
My requirement is to be able to create a column whose elements consist of difference between adjacent elements in a column, say column A. If I can choose alternate elements and create 2 new columns then I can just subtract the 2 columns easily. Huh? "pnair" <pnair@discussions.microsoft.com> wrote in message news:D47AD012-084B-49C6-8672-5067E8455D9E@microsoft.com... > My requirement is to be able to create a column whose elements consist of > difference between adjacent elements in a column, say column A. If I can > choose alternate elements and create 2 new colum...

How can I stop charts from refreshing when changing source data?
My problem is, that I am working with a lot of data and when I change some of the ranges all charts in my view refreshes and it takes much time. My pc is aP4 3GHz, 2GB RAM so that should not be the bottleneck. Is there any way to force the charts not to update all the time? ...

User Defined Required Fields
I have set several field on sub window Sales User-Defined Fields Entry of Sales Transaction Entry as "Required". If the user remembers to click User-Defined, then they become required. But if the user never clicks on User-Defined from Sales Transaction Entry, then they can still save the new document without the required fields entered. Does anyone know what I can do to fix this asside from continual user training? Your answer is VBA. You own Modifer, so you also have VBA enabled. You'll need to write VBA code to open the window (literally, push the button) then set th...

how do I remove fx from the function line, can't enter data
I have the fx displayed just under my toolbar, and I can't enter or change data in any of the cells in the file. I can't get the red X, the Green check mark, or the black = sign to appear. There are very few areas that are not "greyed out" under the headings at the top. This situation applies to all of the excel files on this computer. I have Excel 2000. Please help. Can you move the cursor around anywhere in the spreadsheet? "dmdranch" wrote: > I have the fx displayed just under my toolbar, and I can't enter or change > data in any of the c...

Field mapping for Opportunity Products
Why I can't add some field mapping for OpportunityProduct system relation with Opportunity? I need to know the default pricelist that was assigned for an Opportunity when I am at OpportunityProduct form. ...

Printing Word and excel documents via excel vba
I have a document that has some Excel and some word content i would like to use excel vba to print both a page from word and then a page from excel. I know how to select and open the word document, however i cant find any code to print page X from word. basically i need to: print page 1 of c:\xx\document1.doc print page1 of sheet1 of c:\yy\excelwkbk1.xls print page 2 of c:\xx\document1.doc print page2 of sheet1 of c:\yy\excelwkbk1.xls and so on it will require moving between word and excel - the excel bit i get, but getting back to excel from word, and printing out in word is slightly more...

Is this a correct way of doing an optimistic update
Imagine two different users executing this code at the same time. I can not use the CRecordset Update Delete methods for this. // Check to see if version number has been incremented since this view read in // the client data CClientRecordSet rs(mConn); rs.m_strFilter = "ID = "; rs.m_strFilter += client->GetKey(); rs.m_strFilter +=" AND "; rs.m_strFilter += "Version = "; rs.m_strFilter += client->GetVersion(); // Assuming here, this is acting as a lock on tables referenced mConn->BeginTrans(); rs.Open(CRecordset::snapshot, NULL, CRecordset::re...

Can't Stop External Hard Drive
I have a Western Digital 250 gb external hard drive connected via USB port. I am also running Outlook 2007, which I believe has a function searchindexer.exe that searches all my drives to index the files on them. I want to be able to unplug the drive without first turning off my computer. But I get messages saying that the drive can't be stopped. It used to be that if I stopped searchindexer.exe, I could stop the drive. But that's stopped working. Here are two questions: 1. What is preventing me from stopping the drive?; 2. What is the worst that can happe...

Pay code update with Integration Manager
I am trying to do a Pay Code update for all employees using Integration Manager using the General Payroll Update. I am able to get the standard Pay Codes to update, but cannot seem to get the "Based On" Pay Codes to update. When I log into GP and view the Employee Maintenance and Go To Pay Codes, I see the standard update. However the Based On Pay Codes remain the old rates unless I select select the Pay Code and simply click Ok. Then the update automatically is brought in. How can I get these updates to take without having to visit each of the Based On Pay Codes and sele...

host unreachable after recent Windows Update
Exchange 5.5 on Windows 2000 Server, fully patched and running real swell until Wednesday morning. (Tuesday evening: applied the GDI+ patch: MS04-028.) Didn't find out until later today: internal e-mail is fine, inbound Internet e-mail is fine, but nothing goes out over the IMC. Each outbound e-mail generates Event ID 3010 warning message in the App log: host unreachable. But NSLOOKUP on that very server successfully resolve those same domain names, and ping gets replies. The only other software on this server: GroupShield 5.0 all up-to-date, and VirusScan 8.0.0 patch 1 push...

Updating Related Entities Via Workflow
I'm a complete newbie to workflows, so your help is much appreciated. In general my question is, can a parent entity be updated via workflow rules when some event occurs on a related child entity, or does this need to happen via assembly or callout? Specifically... I have a situation where leads come into our system from various places. Because I cannot add leads to a queue, I use a workflow to create a phone call for each lead and add it to a queue. Now, is it possible (through workflow) that when a user accepts the phone call activity from the queue, that the parent lead own...

How can I keep track of when (date and time) data is entered into.
I am trying to create a spreadsheet for a high school class. I need to be able to track when a student has entered data into specific cells of the spreadsheet. Any ideas? In the code behind the worksheet, enter (eg) Private Sub Worksheet_Change(ByVal Target As Range) Cells(1, 1).Value = Now() End Sub This will enter in Cell A1 the date and time at which any entry is made in that worksheet. If you need the location of the time-stamp to vary according to which cell is changed then you can test the value of Target and vary the destination cell accordingly. -- Return email address is n...

changing a name in mulit parts of a document
I am setting up a word document. This will be used as a template In this document I wish to insert the same "name" throughtout this document. Is it possible to change the name in one spot and all of the others change automatically thanks See http://gregmaxey.mvps.org/Repeating_Data.htm -- <>>< ><<> ><<> <>>< ><<> <>>< <>><<> Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org <>>< ><<> ><<> <>...