customised logos

M

Michael Hansen

Hello

We have a scenario were we have a standard template which needs a different
company logo which means we need to maintain about 10 templates depending on
the company/branch needing to use this.

Is there a way where we could allow the user to select which company they
require when they open the document from a drop down box and then a macro
will insert the appropriate company logo into the document.

Regards
Michael Hansen
 
D

Doug Robbins - Word MVP

You could do it with a userform with a combobox or even images of each of
the logos and then when the user double clicked on one, code assocated with
that image would change the code in an IncludePicture field in the document
so that the selected logo was displayed.


If you have all of the files for the logos in a folder C:\logo, with a copy
of one of the files also in that folder and saved with the name of logo.jpg,
you could also do it with a macro button field

{ MACROBUTTON Logo { INCLUDEPICTURE "C:\\Logo\\logo.jpg } }

and have the following macro in the template

Sub Logo()
Dim fd As FileDialog
Dim LogoFile as String
Set fd = Application.FileDialog(msoFileDialogFilePicker)
fd.Title = "Select the File that contains the Logo"
fd.InitialFileName = "C:\Logo
fd.Filters.Add "Images", "*.jpg", 1
Dim vrtSelectedItem As Variant
With fd
If .Show = -1 Then
LogoFile = .SelectedItems(1)
WordBasic.CopyFileA FileName:=LogoFile,
Directory:="C:\Logo\logo.jpg"
End If
End With
Set fd = Nothing
Selection.Range.Fields.Update
End Sub

When you double click on the logo, a file dialog will open allowing you to
select the file that contains the logo that you want to use and it will then
be displayed in the document.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top