Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 4th, 2007, 04:00 AM
Registered User
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Inserting an image in the header of a word documen

I created a form in Access 2000 the function of which is to create an Access report.

One thing that I want it to is to write the report into a Word document and this I do with the Access Outputto method. There are no problems up this point.

However, what I also want to do is to insert the comapny's logo in the header of the newly created Word document at the same time ie programmatically, rather by manually copying and pasting the image in.

I need to use the Word object model but, despite looking for quite sometime I cannot find an appropriate method. Unfortunately I have very little to do normally with Word VBA and so I need to ask for some help

Am I asking for the impossible?

Any advice will be greatly appreciated.

Old April 4th, 2007, 09:54 AM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

Create a template (.dot) and use it when outputting.

Old April 4th, 2007, 10:55 AM
Friend of Wrox
Join Date: Mar 2007
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post

Totally agree with mmcdonal here, theres no point trying to use a hammer to break an egg.

I find its best to use templates with this sort of stuff as it makes maintenence a lot easier also.
(i.e. if you have a library of all reports/mail outs etc, and your logo changes, you only need to update the template, not the code/image etc.).

Just thought I would add that as maintenence tends to be an often-forgotten issue.


Old April 4th, 2007, 11:26 AM
Registered User
Join Date: Apr 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts

I am clearly doing something wrong here

I have tried using a template previously and tried it again following these suggestions.

However it does not seem to work.

I have created the template and noted the full file path.

When I use the Outputto method, I refer to the full file path of the template.

But when the document outputs, neither the image nor any text that I have put in appear.

Perhaps you can advise.

I have found solution using Word vba but I agree on the point about code maintenance.

Many thanks


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to center the header image kherrerab BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 2 May 29th, 2010 11:51 PM
Output Word WITH Template or Header Graphic Ron Howerton ASP.NET 2.0 Professional 1 October 31st, 2007 03:18 PM
adding Header in Word melvik C# 3 March 15th, 2007 07:26 PM
Modify header and footer of word file in ASP Andraw Classic ASP Basics 1 January 14th, 2005 08:04 PM
Regarding Word header and footer Hari_Word General .NET 0 November 19th, 2004 06:22 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.