Letter merge using backend data

I am a newbie and need some help on how to program a command button to pull 
data from the database backend and merge it into a Word template. Can I do 
this?

I used code I found on this website as a foundation.

Private Sub ApptRemind_Click()
Dim objWord As Object
Dim objMergeDoc As Object

        On Error Resume Next
        Set objWord = GetObject(, "Word.Application")
        If Err.Number <> 0 Then
            Set objWord = CreateObject("Word.Application")
        End If

        Err.Clear

        objWord.Visible = True
        objWord.Activate

        Set objMergeDoc = objWord.Documents.Add("j:\billing\reminder.dot")
-- 
bhsvixon
0
Utf
2/16/2010 10:10:06 PM
access.modulesdaovba 1670 articles. 0 followers. Follow

2 Replies
864 Views

Similar Articles

[PageSpeed] 45

Save yourself the trouble... Albert Kallal wrote some code that does
this really nicely...

http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
0
pietlinden
2/17/2010 1:30:43 AM
Thank you. I love Albert's stuff! :)
-- 
bhsvixon


"pietlinden@hotmail.com" wrote:

> Save yourself the trouble... Albert Kallal wrote some code that does
> this really nicely...
> 
> http://www.members.shaw.ca/AlbertKallal/msaccess/msaccess.html
> .
> 
0
Utf
2/17/2010 2:59:02 PM
Reply:

Similar Artilces:

Mail merge not saving link
Hi, I'm beginning the evaluation of MSCRM 3. I did a mail merge via the Outlook client and indeed the word mail merge was put into the contacts history. Unfortunately, there is no link in the activity to the actual word document. Is there any way to link (automatically) the word document with the activity? Thanks, Cedric ...

Find first previous cell with data
Hi, I am not "fluent" in Excel, so please make any answers "dummy" level. I have a running balance column that spans multiple pages and I am trying to get the last balance from the previous page onto a cell in the following page. Additionally, there are column headings at the beginning of each page and I have all cells (except column heading cells) in this balance column conditionally formatted to not display duplicate balances, so there are cells that appear blank but technically are not. I read a post in General Questions dated 1/16/2006 by Derby Jim and answered ...

Maximum number of characters in merged cells
Is there a maximum number of characters a merged cells will hold? I have a text field of merged cells however, after about 11 rows all of the text does not show even though it looks like there is room for the additional text. Bill, Do a search in help with "Specifications" and you will find: Length of cell contents (text): 32,767 characters. Only 1,024 display in a cell; all 32,767 display in the formula bar Bernard "Bill" <anonymous@discussions.microsoft.com> wrote in message news:A2366FCA-2E93-42E3-82A5-92316657DF4C@microsoft.com... > Is there a maximu...

catalog merge #6
I've got an MS Access database with information on genealogical photos and have successfully created a catalog which merges all the photos with their descriptions. I want to know, if I add more pictures and descriptions to the database, can I re-use this merge design that I've already created or do I have to re-create a catalog design with the wizard every time I add records to the database? Is there an easy way to save the catalog design as a template and just re-run it with the database any time I want? When you save the publication, the merge stays with the file. In step fiv...

How a lib is used?
I am using a file.lib during compile/link, how does it get shipped to client? Thanks. Depends whether its a static code library or an import library. The code from a static code library is bound (copied) into the exe, so it ships with the exe with no extra fuss or hassle. The import library has information for the exe about where to find dynamically linked functions in the dlls. As such it's not required to ship this lib file to the customer: a built exe already has the info it needs. All being well the exe links dynamically at runtime to the dll. Assuming you've built the exe...

Using the result of date math in regular calculations
I doing date math on a Hourly Pay worksheet (for a class). 5:30 - 1:30 = 4:00 - I want to take the result of the subtraction (4:00) and multiply it times a Hourly Rate cell except the format of the number of hours is in a custom/date format. What's the easiest way to convert this to a number? Thanks. Tony Olson Hi use =(A2-A1)*24*hourly_rate -- Regards Frank Kabel Frankfurt, Germany "Tony Olson" <tonyolsonaz@cox.net> schrieb im Newsbeitrag news:#3PhzXssEHA.1272@TK2MSFTNGP12.phx.gbl... > I doing date math on a Hourly Pay worksheet (for a class). > 5:30 - 1:...

Collection Letter
Hi there, for example I build a query 31-45 and it display the aging period as follow: 0-30 days = $1,975 31-45 days = $375 46-60 days = $0 61-75 days = $2,250 76-90 days = $0 91-120 days = $0 When I build the collection letter, and view it, it displayed the overdue balance of $4,600 (which is the total of all the balance). How can I change it so that it display only the overdue balance within the 31-45 days bucket? Thank you in advance. ...

Letter Writing Assistant should let me email the letters.
When sending out letters to Customers etc. it would be much more cost effective if we were able to email the letters in lieu of mailing them. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agree" in the message pane. http://www.microsoft.com/Businesssolutions/Community/NewsGroups/dgbrowser/en-us...

Column labels show digits instead of letter
Can anyone pls tell me why ? And how to fix this. Thanks Jenni Hi goto 'Tools - Options - General' and uncheck 'R1C1 reference style' >-----Original Message----- >Can anyone pls tell me why ? >And how to fix this. > >Thanks >Jenni > > >. > ...

Posted Using Giganews.com
This was posted using Giganews.com server. Lee Seele Lee Steele wrote: > This was posted using Giganews.com server. > > Lee Seele Looking good. Some of us have been using non-MS servers all the time. :-) Bo Persson Bo Persson wrote: > Lee Steele wrote: > > This was posted using Giganews.com server. > > > > Lee Seele > > Looking good. > > > Some of us have been using non-MS servers all the time. :-) I preferred using msnews.microsoft.com as some NNTP servers filter content, and not all have reciproca...

How do I stop bullet letter (a, b, c) from turning greek?
When I create a document in which I have used letters for bulletted lists (ie, a), b), c) etc), when I print or reopen it, the letters have changed to Greek characters alpha, beta etc. How can I stop this from happening? Thanks very much. Wow, I cannot duplicate this in any version of Publisher. Maybe you are using a different type font. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "allythegeek" <allythegeek@discussions.microsoft.com> wrote in message news:C3FD4415-6A6E-4EA1-97BD-0FF22ADFBB5A@microsoft.com... &...

Mail merged but won't send to outlook
Hi, I prepared a one paged letter and merged it with a test list of 8 people. I have no problems with the design etc. When I try to send it or click preview I get a message saying the disk is full and Publisher cannot save into file. I have no idea what it means since I'm not asking it to save anything and I have a lot of free GBs on my disk. Please help. What version Publisher? Are you trying to send the letter as a message? Help here Answer Box: Use e-mail contacts in Publisher mail merge http://office.microsoft.com/en-us/publisher/HA011187801033.aspx -- Mary Sauer MSFT MVP http://o...

What file stores my letters
I am going to format my hard drive and I want to keep my letters. what extension do I need to copy and in what folder are they in. BTW, my address is book as well. Thank you, Berto Try search. Asked and answered about a hundred times a month "Berto" <Albertocarro@yahoo.com> wrote in message news:1t3vd.94941$EZ.18536@okepread07... > I am going to format my hard drive and I want to keep my letters. what > extension do I need to copy and in what folder are they in. BTW, my address > is book as well. > > Thank you, > > Berto > > ...

How do I use the mouse wheel to scroll horizontally in excel?
I would like to be able to change from scrolling vertically in an excel document to horizontally. How would I do this? Alison, I examined the mouse's device properties and this feature is not present on my mouse. I think you are going to need a better mouse, per Chips post which I've copied below... Roy Get a Microsoft mouse with the "TiltWheel" feature. It lets you tilt the wheel horizontally to scroll left and right. I have a wireless one, and am very satisfied with it. Unfortunately, the mouse driver that comes with it causes the wheel not to work in the VBA ...

to lookup data for 'today()'
e.g A B C D 1 Date (From) 01 Jan 2009 01 Feb 2009 01 Mar 2009 2 Date (To) 31 Jan 2009 28 Feb 2009 31 Mar 2009 3 Actual Qty 205 217 300 4 Target Qty 180 250 401 if today = 15 Feb 2009, how to get actual qty using excel formula? Hi, =SUMPRODUCT(--(TODAY()>=A1:H1),--(TODAY()<=A2:H2),A3:H3) "nordiyu" wrote: > e.g > >...

problem importing downloaded data
We use money 03, previously when importing downloaded bank data, Money would ask which account to open for the imported data, now it automatically imports into the wrong account without prompting. Is there a remedy for this? In microsoft.public.money, Hans wrote: >We use money 03, previously when importing downloaded bank data, Money would >ask which account to open for the imported data, now it automatically imports >into the wrong account without prompting. Is there a remedy for this? Make an extra copy/backup of your file in case you want to undo something. See http://supp...

Letter of Credits & Letter of Guarantee
Hello... Is there any module in Great Plains that handles Letter of Credits and Letter of Guarantee Thanks Tareq Not exactly. I suppose you could find a place in POP and SOP to store the L/C number. You could build fairly complicated applications using Extender. What is your requirement? HS "Tareq" <Tareq@discussions.microsoft.com> wrote in message news:9A1043B4-516C-4F38-901A-F21612C53ED3@microsoft.com... > Hello... > Is there any module in Great Plains that handles Letter of Credits and > Letter of Guarantee > > Thanks > Tareq Hello HSalim... Th...

CSVDE Data [WILDPACKET]
I want to export sending message size or storage limit mailbox information from my AD. Is this possible, if yes, can somebody please let me know the CSVDE commands and AD attribute? Thank you in advance. Here's a script that will show you the mailbox storage limit - if it's NOT the default (as specified by policy). http://www.suneja.com/blog/2005/10/script-show-mailbox-limits.html -- Bharat Suneja MCSE, MCT www.zenprise.com blog: www.suneja.com/blog ----------------------------------------- "WILDPACKET" <WILDPACKET@discussions.microsoft.com> wrote in message...

Merged Cells and not printing all content.
I have two merged cells that run the entire length of a page on the last two R/H columns. Everything looks good except for the last few lines, which appear to have different margins than the text above (in the same cell). It is not showing all of the text. All rows and columns have been manually adjusted, so the problem should not be related to the AutoFit feature. Anyone have any thoughts? Maybe you're approaching 1000 characters in the cell. Left to its own devices, excel will only show about 1000. You can add alt-enters to force new lines within your cell and you can see mo...

Problem using CPropertySheet over CFormView
Hi! I have three views in an MFC SDI application, split using CSplitterWnd. And in one of the views we have some edit controls and gird controls. In the same view, on selection of a menuitem, I create a modeless CPropertySheet with two pages and place it over the edit controls. Now on clicking the property sheet, I am getting the overlapped display of editcontrols in the view. How can I avoid this. Please help. Thanking you in anticipation. Best Regards! Babu PSM Babu wrote: > Hi! > > I have three views in an MFC SDI application, split using > CSplitterWnd. > And in one ...

Find and Replace using a Loop won't stop
I am trying to replace cells on certain rows with the value in cell I1 within column I based on a found row from a cell in column C. I have the following macro: ActiveCell.FormulaR1C1 = "='Master'!R3C9" Selection.Copy TotalRowsToDo = ActiveCell.CurrentRegion.Rows.Count Counter = 1 Do Until Counter = TotalRowsToDo Cells.Find(What:="FB01", After:=ActiveCell, LookIn:=xlFormulas, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchForm...

Letter to a contact
In Outlook 2000, our office would like to select 1 contact from the address book and have info feed into a custom letter format (with our margins, indents, etc.) in Word, and then type the body text Is this automation possible? Thank you! ...

first letter to upper
Hello Please can you tell me how to change only the first letter of the first word in a cell, to upper case but not the other words. (Excel 03) Ta D Assuming A1 has your data, just use the following in B1 (or wherever) =UPPER(LEFT(A1,1))&RIGHT(A1,LEN(A1)-1) Hi With your data in A1 enter in B1 =PROPER(A1) Copy down as required. Then, copy column B>Paste Special>Values only to "fix" the formulae to values. Column A can then be deleted (if required) -- Regards Roger Govier Dingbat wrote: > Hello > Please can you tell me how to change on...

Numbering worksheets using Auto Fill
Is it possible to number worksheets using Auto Fill Method? Your assistance will be appreciated. If you're referring to the worksheet (tab) names, no. In article <2A39D5BC-631A-4DEF-BC8B-49083DFD5DE7@microsoft.com>, Dhaval <Dhaval@discussions.microsoft.com> wrote: > Is it possible to number worksheets using Auto Fill Method? > > Your assistance will be appreciated. Hi, What do you mean by Autofill? Could you just eloborate with some example. You can only rearrange worksheet tab in the workbook an then right click to the left corner of the Worksheet tab row ...

How to save emails using Outlook
I have kept most of my old emails in Outlook. I have decided to purge most of these old emails. Does anyone know of a good way to save these old emails AND attachments in a searchable file/database (or, I guess a txt file could be imported into Access Database???). We are using MS Exchange 2000 server with Outlook 2002 on XP Pro workstation. Thank you On 14 Jul 2005 12:03:36 -0700, melickas@yahoo.com wrote: >I have kept most of my old emails in Outlook. I have decided to purge >most of these old emails. Does anyone know of a good way to save these >old emails AND attachments ...