Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 03-05-2012, 06:32 AM
KenZu KenZu is offline Choose your footer? Windows Vista Choose your footer? Office 2003
Novice
Choose your footer?
 
Join Date: Jan 2011
Location: Sweden
Posts: 13
KenZu is on a distinguished road
Exclamation Choose your footer?


Is it possibly to get some kind of pop-up when you open a document?

The thing is that I want to have the opportunity to deside if I should go with sidefoot a or b.

(Word 2007 and Excel 2007)

Last edited by KenZu; 03-05-2012 at 11:59 PM.
Reply With Quote
  #2  
Old 03-05-2012, 06:28 PM
macropod's Avatar
macropod macropod is offline Choose your footer? Windows 7 64bit Choose your footer? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Yes, it is possible to get a pop-up, but I have no idea what you mean by a 'sidefoot'.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-05-2012, 11:27 PM
KenZu KenZu is offline Choose your footer? Windows Vista Choose your footer? Office 2007
Novice
Choose your footer?
 
Join Date: Jan 2011
Location: Sweden
Posts: 13
KenZu is on a distinguished road
Default

Lol, my bad english, I meant footer

Is there any guide or something?
Reply With Quote
  #4  
Old 03-06-2012, 12:24 AM
macropod's Avatar
macropod macropod is offline Choose your footer? Windows 7 64bit Choose your footer? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Why on earth would you want a macro for this, when you can access the footer at any time just by double-clicking on the header area and scrolling down?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 03-06-2012, 12:39 AM
KenZu KenZu is offline Choose your footer? Windows Vista Choose your footer? Office 2007
Novice
Choose your footer?
 
Join Date: Jan 2011
Location: Sweden
Posts: 13
KenZu is on a distinguished road
Default

We are using like 100 documents and would like to change it depend on which office we're using.
So we need a macro, so we do not forget.
Reply With Quote
  #6  
Old 03-06-2012, 03:31 AM
macropod's Avatar
macropod macropod is offline Choose your footer? Windows 7 64bit Choose your footer? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

OK, if you add the following code to the Normal template's 'ThisDocument' module, you should get the desired prompt:
Code:
Option Explicit
 
Private Sub Document_New()
Call Document_Open
End Sub
 
Private Sub Document_Open()
  If MsgBox("Go to Footer?", vbYesNo, "Destination Selector") = vbYes Then
    ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryFooter
  End If
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 03-06-2012, 11:49 PM
KenZu KenZu is offline Choose your footer? Windows Vista Choose your footer? Office 2007
Novice
Choose your footer?
 
Join Date: Jan 2011
Location: Sweden
Posts: 13
KenZu is on a distinguished road
Default

Thanks for the answer.
But to make it more complicate. When I open xxx.dot I want to get something like a roll-list or button said, "Gothenburg", "Stockholm" "Malmö" aso.
And when i push/choose Gothenburg the footer will change automatic.
Reply With Quote
  #8  
Old 03-07-2012, 12:24 AM
macropod's Avatar
macropod macropod is offline Choose your footer? Windows 7 64bit Choose your footer? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

If you have three different offices (Gothenburg, Stockholm, Malmö), surely it would be better to have the templates for each location contain the relevant city name. That way, no-one needs to select anything.

Aside from that, I need to know whether the prompt is supposed to appear every time a document is opened, or only when you create a new one.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 03-07-2012, 12:35 AM
KenZu KenZu is offline Choose your footer? Windows Vista Choose your footer? Office 2007
Novice
Choose your footer?
 
Join Date: Jan 2011
Location: Sweden
Posts: 13
KenZu is on a distinguished road
Default

It should appear everytime a template is opened.

For exampel. If you choose Gothenburg, the footer will change to:
" Gothenburg AB, Tel 010-123456, www.gothenburg.com "
Reply With Quote
  #10  
Old 03-08-2012, 01:40 AM
macropod's Avatar
macropod macropod is offline Choose your footer? Windows 7 64bit Choose your footer? Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Ken,

Try the following code:
Code:
Private Sub Document_New()
Call Document_Open
End Sub
 
Private Sub Document_Open()
Application.ScreenUpdating = False
Dim Rng As Range, Str As String, Fld As Field, i As Long
i = CLng(InputBox("Which Office?" & vbCr & "1: Gothenburg, 2: Stockholm, 3: Malmö"))
If i = 0 Or i > 3 Then Exit Sub
With ActiveDocument.Sections(1).Footers(wdHeaderFooterPrimary)
  Set Rng = .Range.Characters.First
  Rng.Collapse wdCollapseStart
  For Each Fld In .Range.Fields
    With Fld
      If .Type = wdFieldQuote Then
        Set Rng = Fld.Result
        .Delete
        Exit For
      End If
    End With
  Next
  Select Case i
    Case 1
      Str = "Gothenburg AB, Tel 010-123456, www.gothenburg.com"
    Case 2
      Str = "Stockholm AB, Tel 010-123456, www.stockholm.com"
    Case 3
      Str = "Malmö AB, Tel 010-123456,www.malmö.com"
  End Select
  Set Fld = ActiveDocument.Fields.Add(Range:=Rng, Type:=wdFieldQuote, _
    Text:="""" & Str & """", PreserveFormatting:=False)
End With
Set Fld = Nothing: Set Rng = Nothing
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Choose your footer? Macro to save as pdf with ability to choose save as folder rvessio Word VBA 4 07-25-2016 12:37 PM
Choose your footer? How to choose scale effect for Formatting Palette? schwine Excel 1 04-09-2011 11:23 PM
How to choose scale effect for Formatting Palette? schwine Word 0 04-02-2011 09:11 AM
Choose Folder for GMail or Pop3 account to go to datagopher Outlook 1 10-14-2010 10:55 AM
Unable to choose Address books Hyneso Outlook 0 08-11-2010 03:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft