Refreshing fields in table cells.

Situation is as follows ...

A document header contains a text box.
This text box contains a table.
The table has a field in each cell (20 fields in total).
How do I select all these fields in VBA to refresh their values?

The text box (and the table therein) are in a building block that is placed 
in the header using a macro. I know the cells can refresh because I see the 
refreshed values if I do a print preview, but I want to see them while 
looking at page Layout just after I have defined new field values. Field 
values are applied via a user form and it also here after pressing Ok that I 
want to refresh the fields.

thanks
Robin 
0
Utf
1/20/2010 9:54:01 PM
word.vba.general 1023 articles. 1 followers. Follow

2 Replies
1261 Views

Similar Articles

[PageSpeed] 12

The simple way is to use

With ActiveDocument
    .PrintPreview
    .ClosePrintPreview
End With

You will hardly notice the opening and closing of the Print Preview display.

-- 
Hope this helps,

Doug Robbins - Word MVP

Please reply only to the newsgroups unless you wish to obtain my services on
a paid professional basis.

"Robin" <Robin@discussions.microsoft.com> wrote in message 
news:DF43AEF1-6087-402B-9995-65222B63ECC2@microsoft.com...
> Situation is as follows ...
>
> A document header contains a text box.
> This text box contains a table.
> The table has a field in each cell (20 fields in total).
> How do I select all these fields in VBA to refresh their values?
>
> The text box (and the table therein) are in a building block that is 
> placed
> in the header using a macro. I know the cells can refresh because I see 
> the
> refreshed values if I do a print preview, but I want to see them while
> looking at page Layout just after I have defined new field values. Field
> values are applied via a user form and it also here after pressing Ok that 
> I
> want to refresh the fields.
>
> thanks
> Robin 

0
Doug
1/21/2010 12:06:14 AM
Thanks that certainly did the trick!
Robin
0
Utf
1/22/2010 9:17:02 AM
Reply:

Similar Artilces:

What fields for Mail Merge?
Is there a list somewhere of the mail merge field names? Particulary around a quote and contacts? Thanks, Sean Hi Sean! I have not a list of all columns you can use with the default CRM MailMerge functionallity. But what is clear you can not use custom fields. If you use our WordMailMerge(www.mscrm-addons.com) Add-On you can use every contact and quote field you want, even custom fields. -- Christian support@mscrm-addons.com www.mscrm-addons.com Your company for MS-CRM ADD-ONS! GroupCalendar for MSCRM Related Documents for MSCRM WordMailMerge for MSCRM ...

Insert Formula in cells from VBA
Hi, I have different data related together on a sheet. I want to create a formula selecting the function depending the code I have in cell A7 The formula in all cell should be like this = Choose(A7,ATV,Connect,Sales,Hours, Closing) Each option (ATV, Connect, etc) = "a function I need to create for each case" In case the user select "1" in cell A7 to increase the ATV, the cell should use the function ATV Using a relative reference so I can use it everywhere I tried this: Function ATV() ActiveCell.FormulaR1C1 = "=Average (RC[-3:RC[-1])" End Fun...

User-defined Ph# fields for contacts; is is possible?
In Outlook 2000 or 2003, I can find no way to define my own phone number types for contacts. Under Phone Numbers (in 2003), the default settings are Business, Home, Business Fax, and Mobile. If I click the carat next to each of these, I can choose another type from the list, but the list only includes 19 types and no way to define my own (that I can see). We deal with large companies and often need to keep numbers for many different departments within the company. Outlook Contacts seems to have many features and fields geared toward storing information about individuals, but we nee...

Integration manager, GP9.0, data from tables???
Here's the situation: Using GP9.0 and need to import sales through SOP. I created a gateway between the company proprietary systems and GP 9.0 using Access 2003. The data is created and stored in tables I created in the appropriate company databases. Its easy in Access to connect to the appropriate company using RegisterGlobals9. How can I get IM to mimic that so I can create the three data sources I need to make the SOP integration work? One option is to dump the tables to CSV and use them to integrate but that appears to be plagued by a rounding problem (specifically, the MS ...

how do i refresh or sync all?
I am trying to force my mail to refresh, or to look for new mail much like Outlook Express does when you click on "Sync All". Maybe I shouldn't be concerned with this. Does Outlook deliver mail as soon as it is processed by the server or is it sent at preset intervals set by the administrator? Les perhaps you mean Send/Receive ? Still learning wrote: > I am trying to force my mail to refresh, or to look for new mail much like > Outlook Express does when you click on "Sync All". Maybe I shouldn't be > concerned with this. Does Outlook de...

how to navigate through unprotected cells only in a worksheet
I have created a template in a work sheet that contains only a few variables that need information to be enter by the user. How do I get the user (with the TAB Key or any other key) to move from unprotected cell to unprotected cell skiping protected cells in between? Hi, When you protect the sheet make sure the option that allows user to select protected cells is un-checked. Mike "VictorO" wrote: > I have created a template in a work sheet that contains only a few variables > that need information to be enter by the user. How do I get the user (with > the TAB ...

Removing Schema fields
Hi I have added a field to the contact entity using the Deployment manager and have encountered two problems: (1) Firstly, how on earth do I remove fields I don't want. (2) The field I added was a 500 length string. It seemed to add ok (although it took a long time), but when I go to add another field it throws an error and refuses. When I look in the event log it claims that the maximum row length of approx 8000 has been exceeded. Does this mean that there is a limit on the number and length of attibutes that can be added? Is there a way around this limitation? Cheers Nick ...

pivot tables
Hi all, I have a spreadsheet that has a variety of 'fields', split into column ie. name | address1 | address 2 | priority | zone I have created a pivot table that shortlists based on the priority an zone fields. Problem is, I can only get the 'name' data listed in th result rows, and not the associated address data. The ideal is to b able to generate as follows; Pivottable priority - select from a dropdown (done this) zone - select from a dropdown (done this) name1 - address1 address2 name2 - address1 address2 name3 - .... Any ideas -- Message posted from http...

properties error in the field in the form
I just created a form. On the fields there must be an error in the properties. I can't type in the field and I have the #name? error and the #error Error. It looks like I connected the fields to the underlying table correctly so what should I check? =Employees!Emp_ID =Employees!FirstName =[Salary] thanks, If the fields are bound to textboxes on the form, you do not need to use a reference to the underlying table or query. Emp_ID FirstName Salary should be all you need in the controlname property. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access ht...

Refresh some not Refresh All
Hello. I have a workbook with 10 sheets all of which have external data that needs to be refreshed periodically. Most of the time I only need to refresh 8 of the sheets. Is there a way to refresh just those 8 without having to refresh each one separately? Thanks in advance. You can use a macro to do it. It would go something like this... Sub RefreshSome() Dim wks As Worksheet Dim qt As QueryTable For Each wks In Worksheets Select Case wks.Name Case "Sheet1", "sheet2" Case Else For Each qt In wks.Que...

Ive added new fields to my transaction form and cant delete them
I've forgotten how I added them, any ideas? In microsoft.public.money, fpdave wrote: >I've forgotten how I added them, any ideas? Delete the Classification. What program are you using? That did it, much apreciated. I did searches for field, column, etc. On Fri, 22 Oct 2004 18:07:19 GMT, via_newsgroup@please.tnx(Cal Learner-- MVP) wrote: >In microsoft.public.money, fpdave wrote: > >>I've forgotten how I added them, any ideas? > >Delete the Classification. What program are you using? ...

Transfer Out Fields
I'm using RMS 2, What is the field name for the Transfer Type field? the drop down box allows for standard, intra-store, supplier. How can i test the field to determine which type of transfer it is? I am using <CONDITION>(PurchaseOrder.Type = PurchaseOrderTypeHQIssue) | (PurchaseOrder.Type = PurchaseOrderTypeLocalIssue)</CONDITION> to determine its direction (in or out). RLambert - PurchaseOrder.Type = 3 for all Transfers Out. The difference between the RMS Screen "Transfer Types" in the PurchaseOrder table are the ShipTo, OtherStoreID and SupplierID fields. Make...

Refresh 1 subform from another
I am trying to refresh a subform from another subform and I cannot seem to make it work. I have a button on subform 2 that needs to have subform1 refresh. I used Me.subform1.mainform.form.refresh and I get an error that says Method or Data Member not found. Anyone know what I did wrong? I am thinking I should use ! instead of . but I don't know what the difference is between them. Any help? -- Thanks As Always Rip Ripper wrote: >I am trying to refresh a subform from another subform and I cannot seem to >make it work. I have a button on subform 2 that needs to have su...

Default the field
Hi All,, When I using the find function(Ctrl F), the check box of "Search Fields As Formatted" is defaulted a tick sign. How to make it default as unchecked? For this result, I can't find a single digit record number by using "001" format. I thought that Application.SetOption might do the trick. Something like below can change the Find/Replace behavior. Application.SetOption "Default Find/Replace Behavior", 2 However this does not work: Application.SetOption "Search Fields As Formatted", False Sorry. -- Jerry Whitt...

Field Switched
Hello, I have a syntax error in a Word 2003 calculated form control. I have read many of the articles suggested here when dealing with field switches, etc., but keep getting the syntax error. Here is what I am doing and why. Creating a form that will be used by very inexperienced computer users. Some may fill out the form electonically, thus the form fields, others will print it out and fill it in. It must be as simple as possible. verification field with number fields set to calculate on exit and a total calculated field which shows a zero by default. We cannot have th...

VWD2008 will not refresh HTML file
I am trying to use the showmodaldialog function to display help files for my website. But when I make modifications to the HTML file, a previous version of that file is displayed from within the VWD environment, even if I just want to debug that file. I have restarted VWD, but the old version is still displayed. When I double-click that same file outside the VWD environment, the modified version is displayed, so I know the changes are being saved. I have searched the entire hard drive and there is no other file with the same name. ...

Divide two cells and if the number is negative display is as zero
I have an excell spread sheet and i am dividing two cells. Most of the numbers are positve but some of the numbers are negative. I want to put a formula in to all the cells that will divide the two cells and give me the answer to one digit but if the number is negative i want it to display as 0. Maybe something like this... =MAX(0,ROUND(A1/A2,1)) -- Biff Microsoft Excel MVP "mike" <mike@discussions.microsoft.com> wrote in message news:74196BD1-586C-47B9-BAFE-C0D895666B9A@microsoft.com... >I have an excell spread sheet and i am dividing two cells. Mos...

Creating new Schema Fields (Error)
I have added about 14 new fields to the Contact Schema. But now when I try to add another I get and error. I checked the event logs at it states that I have exceeded the SQL Server row limit size of 8000. Is there a work around or a way of increasing the size limit on the table/schema? The 8000 byte limit is a SQL limitation, not a CRM limitation. The problem is, the out of the box schema for Contact is extremely large. There are a number of fields that are serveral hundred chars long. SQL will actually allow you to define a table with fields that "could" be larger than 8...

SUM CELLS
I used to be able to click and drag my pointer over a range of cells, and in the bottom right corner of the program in the status bar it would show me the sum of the cells. That some how became disabled. Any idea how I can get the feature back? T.I.A. with your mouse, right-click down there, where you used to see the sum, and you'll get a pop-up menu of formulas that will be applied when you highlight a group of cells. Most likely, "None" is selected. Select the formula you want (SUM) and you should be back on track. "BatMan" <sdpan@NONSPAMMAN.com> wrote...

Cells WON'T stop refreshing automatically
I have a workbook with many worksheets and links that I need to publish externally with links locked so that users won't get the "The workbook you opened contains automatic links..." message. I have gone into <Tools> <Options> <Calculation>, unchecked the <Update Remote References> checkbox, and saved the workbook; however, each time I reopen the saved workbook, the <Update Remote References> checkbox has been rechecked by some mischevious gremlin, and I invariably get the "The workbook you opened contains automatic links..." mess...

Running Totals not working after zero cell
I am trying to recreate a bank statement. Rightly or wrongly I have pulled into the report a calculation for the balance movement each day (based on queries calculating several transactions for that day). The running sum works until there is no movement for a day which shows in the report as a "0" most likely through a "Nz([ ],0)" calculation after which it stops calculating. e.g. Move Run Bal 1/1/08 +100 100 2/1/08 +50 150 3/1/08 0 150 4/1/08 +25 150 etc etc Is there any way to fix this? Thanks Post the expression behind this field...

Username Field/General Options
Hello, I have problem with field named "Username" on General Tab (Options). By a standart this field is filled with Administrator user name for every user (we use TS Servers). Is there a way to fill this field correctly with use of some script or GP (now i need to apply this setting to every user) ? I was not able to find out the solution yet, but in moment if i'm trying to open the file which is is opened by some else (no matter who), i'm getting a shitty message, that file is used by administrator (changing this option field results in correct user recognization, of cours...

Refreshing
Hi !! I ve done a OCX to view certain type of images. The OCX has a dialog in it with buttons. This OCX has been loaded into a html page. When multiple OCX are being placed in the html page I find the images that are displayed flickers. I use invalidate to refresh but refreshing is very fast. What should I do now to make smooth refreshing. Thanx Sudharsan Double buffer the image. Create a memory bitmap, copy to it, the BitBlt to your OCX's HDC. This may increase CPU usage a little. "Sudharsan" <Sudharsan@discussions.microsoft.com> wrote in message news:A72BC9BB-...

Web Query Refresh problem
Hi I've set up a workbook that contains about 75 sheets. Each sheet contains a web query. I then have a summary sheet which summarises the actual part of information that I want from each web page. Everything works fine, most of the time. I've set up a little button to 'refresh all data'. However, sometimes the refresh doesnt seem to work on some of the sheets. It actually pulls data from a website which I've set up on a different sheet. If, however, you go to that individual sheet, and manually refresh that sheet, it pulls through the correct data from the web. Som...

sendobject, emal bcc recipients from field
Hello all, I am not a programmer, although I have been picking things up along the way, so if any of my explanations sound rudimentary I apologize in advance. I have designed a database to keep track of my students, each student record includes things like a Student ID (primary key), firstname, lastname, email address, and various other contact information. I want to be able to have a control on my form which allows me to email my students with the click of a button. I am using the SendObject function to open a new email, I then select acSendNoObject. What I want to be able to do ...