A Microsoft Word forum. Microsoft Office Word Forum - WordBanter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Microsoft Office Word Forum - WordBanter forum » Microsoft Word Newsgroups » Microsoft Word Help
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Bring Word 2003 to the front.



 
 
Thread Tools Display Modes
  #1  
Old March 7th 08, 10:48 AM posted to microsoft.public.word.docmanagement
Skeddy
external usenet poster
 
Posts: 5
Default Bring Word 2003 to the front.

I hope somebody can help me.

I have a document with field cods in it which are linked to the document
properties.

In the document I have put a macro which opens up the document properties
dialogue box to let you input the information, the fools it into updating all
of the field codes by printing page 0. Not elegant I know but I couldn't find
a command to update all of the field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=False,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is from within
the document or from a button on the toolbar, XP will send the document down
to the taskbar if it perceives that another open application has priority, or
was open first.

Is there a way around this ? I have tried everything I can think of i.e
"ActiveDocument.Activate", "ActiveDocument.BringToFront = True" but nothing
seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.
Ads
  #2  
Old March 7th 08, 11:32 AM posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
 
Posts: 19,312
Default Bring Word 2003 to the front.

If these are form fields, then provided they are not in the header/footer
you can update them from doc properties by checking the calculate on exit
check box of one of the fields. They will update when you tab out of the
field.
If this is not a protected form and you want to update docproperty fields
then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the fools
it into updating all of the field codes by printing page 0. Not
elegant I know but I couldn't find a command to update all of the
field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=False,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is from
within the document or from a button on the toolbar, XP will send the
document down to the taskbar if it perceives that another open
application has priority, or was open first.

Is there a way around this ? I have tried everything I can think of
i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront = True"
but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.



  #3  
Old March 7th 08, 11:51 AM posted to microsoft.public.word.docmanagement
Skeddy
external usenet poster
 
Posts: 5
Default Bring Word 2003 to the front.

Graham,

Thanks for the print preview idea, that is better as I now dont get the
document sent to printer dialog. I have to use thsi as some of the fields are
in the header and footer.

Unfortunately the problem of the document being snt to the back persists. As
soon as the macro ends XP, or Word puts the document behind the last window
opened.

Is there any way around this ?

Regards,

Skeddy.

"Graham Mayor" wrote:

If these are form fields, then provided they are not in the header/footer
you can update them from doc properties by checking the calculate on exit
check box of one of the fields. They will update when you tab out of the
field.
If this is not a protected form and you want to update docproperty fields
then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the fools
it into updating all of the field codes by printing page 0. Not
elegant I know but I couldn't find a command to update all of the
field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=False,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is from
within the document or from a button on the toolbar, XP will send the
document down to the taskbar if it perceives that another open
application has priority, or was open first.

Is there a way around this ? I have tried everything I can think of
i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront = True"
but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.




  #4  
Old March 7th 08, 12:23 PM posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
 
Posts: 19,312
Default Bring Word 2003 to the front.

Without seeing your code it is difficult to see what it is doing.
However you should call the document you want to activate eg

Dim dSource As Document, dTarget As Document
Dim sFname as String

sFname = "C:\Path\Docname.doc"
Set dSource = ActiveDocument
Set dTarget = Documents.Open(sFname)
'Do your stuff
dSource.Activate


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
Graham,

Thanks for the print preview idea, that is better as I now dont get
the document sent to printer dialog. I have to use thsi as some of
the fields are in the header and footer.

Unfortunately the problem of the document being snt to the back
persists. As soon as the macro ends XP, or Word puts the document
behind the last window opened.

Is there any way around this ?

Regards,

Skeddy.

"Graham Mayor" wrote:

If these are form fields, then provided they are not in the
header/footer you can update them from doc properties by checking
the calculate on exit check box of one of the fields. They will
update when you tab out of the field.
If this is not a protected form and you want to update docproperty
fields then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the fools
it into updating all of the field codes by printing page 0. Not
elegant I know but I couldn't find a command to update all of the
field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=False,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is from
within the document or from a button on the toolbar, XP will send
the document down to the taskbar if it perceives that another open
application has priority, or was open first.

Is there a way around this ? I have tried everything I can think of
i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront = True"
but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.



  #5  
Old March 7th 08, 12:28 PM posted to microsoft.public.word.docmanagement
Skeddy
external usenet poster
 
Posts: 5
Default Bring Word 2003 to the front.

Graham,

Thanks your reply, both tricks wok with the update field codes (I do have
some in the header and footers).

I am still stuck with Word being relegated to the background porblem though,
even if I use either print preview or the update fields macro.

Any Ideas or is it a "feature" of XP ?

Regards,

Skeddy.

"Graham Mayor" wrote:

If these are form fields, then provided they are not in the header/footer
you can update them from doc properties by checking the calculate on exit
check box of one of the fields. They will update when you tab out of the
field.
If this is not a protected form and you want to update docproperty fields
then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the fools
it into updating all of the field codes by printing page 0. Not
elegant I know but I couldn't find a command to update all of the
field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=False,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is from
within the document or from a button on the toolbar, XP will send the
document down to the taskbar if it perceives that another open
application has priority, or was open first.

Is there a way around this ? I have tried everything I can think of
i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront = True"
but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.




  #6  
Old March 7th 08, 12:36 PM posted to microsoft.public.word.docmanagement
Skeddy
external usenet poster
 
Posts: 5
Default Bring Word 2003 to the front.

Graham,

Sorry about the last one my screen had not updated.

Anyway all the code is is:

Application.Dialogs(750).Show
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

There is no more to it, I'm not clever enough for anyhting fancy I
cannot understand why the current document is moved to behind whichever
window XP perceives has priority.

Any ideas ?

Best regards,

Keith.


"Graham Mayor" wrote:

Without seeing your code it is difficult to see what it is doing.
However you should call the document you want to activate eg

Dim dSource As Document, dTarget As Document
Dim sFname as String

sFname = "C:\Path\Docname.doc"
Set dSource = ActiveDocument
Set dTarget = Documents.Open(sFname)
'Do your stuff
dSource.Activate


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
Graham,

Thanks for the print preview idea, that is better as I now dont get
the document sent to printer dialog. I have to use thsi as some of
the fields are in the header and footer.

Unfortunately the problem of the document being snt to the back
persists. As soon as the macro ends XP, or Word puts the document
behind the last window opened.

Is there any way around this ?

Regards,

Skeddy.

"Graham Mayor" wrote:

If these are form fields, then provided they are not in the
header/footer you can update them from doc properties by checking
the calculate on exit check box of one of the fields. They will
update when you tab out of the field.
If this is not a protected form and you want to update docproperty
fields then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the fools
it into updating all of the field codes by printing page 0. Not
elegant I know but I couldn't find a command to update all of the
field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True, Background:=False,
PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is from
within the document or from a button on the toolbar, XP will send
the document down to the taskbar if it perceives that another open
application has priority, or was open first.

Is there a way around this ? I have tried everything I can think of
i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront = True"
but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.




  #7  
Old March 7th 08, 12:57 PM posted to microsoft.public.word.docmanagement
Graham Mayor
external usenet poster
 
Posts: 19,312
Default Bring Word 2003 to the front.

It happens here to, but is easily fixed

On Error Resume Next
With Application
..Dialogs(750).Show
With ActiveDocument
.PrintPreview
.ClosePrintPreview
End With
.WindowState = wdWindowStateMinimize
.WindowState = wdWindowStateNormal
End With

This minimizes the application than restores it again which brings it to the
front.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
Graham,

Sorry about the last one my screen had not updated.

Anyway all the code is is:

Application.Dialogs(750).Show
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

There is no more to it, I'm not clever enough for anyhting fancy I
cannot understand why the current document is moved to behind
whichever window XP perceives has priority.

Any ideas ?

Best regards,

Keith.


"Graham Mayor" wrote:

Without seeing your code it is difficult to see what it is doing.
However you should call the document you want to activate eg

Dim dSource As Document, dTarget As Document
Dim sFname as String

sFname = "C:\Path\Docname.doc"
Set dSource = ActiveDocument
Set dTarget = Documents.Open(sFname)
'Do your stuff
dSource.Activate


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
Graham,

Thanks for the print preview idea, that is better as I now dont get
the document sent to printer dialog. I have to use thsi as some of
the fields are in the header and footer.

Unfortunately the problem of the document being snt to the back
persists. As soon as the macro ends XP, or Word puts the document
behind the last window opened.

Is there any way around this ?

Regards,

Skeddy.

"Graham Mayor" wrote:

If these are form fields, then provided they are not in the
header/footer you can update them from doc properties by checking
the calculate on exit check box of one of the fields. They will
update when you tab out of the field.
If this is not a protected form and you want to update docproperty
fields then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the
fools it into updating all of the field codes by printing page 0.
Not elegant I know but I couldn't find a command to update all of
the field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True,
Background:=False, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is
from within the document or from a button on the toolbar, XP will
send the document down to the taskbar if it perceives that
another open application has priority, or was open first.

Is there a way around this ? I have tried everything I can think
of i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront =
True" but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.



  #8  
Old March 7th 08, 04:23 PM posted to microsoft.public.word.docmanagement
Skeddy
external usenet poster
 
Posts: 5
Default Bring Word 2003 to the front.

Graham, you are a hero.

Thank you very much, it was the "windowstate" commands I needed.

Works like a charm now.

Best regards,

Skeddy.

"Graham Mayor" wrote:

It happens here to, but is easily fixed

On Error Resume Next
With Application
..Dialogs(750).Show
With ActiveDocument
.PrintPreview
.ClosePrintPreview
End With
.WindowState = wdWindowStateMinimize
.WindowState = wdWindowStateNormal
End With

This minimizes the application than restores it again which brings it to the
front.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
Graham,

Sorry about the last one my screen had not updated.

Anyway all the code is is:

Application.Dialogs(750).Show
ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

There is no more to it, I'm not clever enough for anyhting fancy I
cannot understand why the current document is moved to behind
whichever window XP perceives has priority.

Any ideas ?

Best regards,

Keith.


"Graham Mayor" wrote:

Without seeing your code it is difficult to see what it is doing.
However you should call the document you want to activate eg

Dim dSource As Document, dTarget As Document
Dim sFname as String

sFname = "C:\Path\Docname.doc"
Set dSource = ActiveDocument
Set dTarget = Documents.Open(sFname)
'Do your stuff
dSource.Activate


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
Graham,

Thanks for the print preview idea, that is better as I now dont get
the document sent to printer dialog. I have to use thsi as some of
the fields are in the header and footer.

Unfortunately the problem of the document being snt to the back
persists. As soon as the macro ends XP, or Word puts the document
behind the last window opened.

Is there any way around this ?

Regards,

Skeddy.

"Graham Mayor" wrote:

If these are form fields, then provided they are not in the
header/footer you can update them from doc properties by checking
the calculate on exit check box of one of the fields. They will
update when you tab out of the field.
If this is not a protected form and you want to update docproperty
fields then you can use the update macro used as an example at
http://www.gmayor.com/installing_macro.htm
If you want to update the fields by 'printing' then

ActiveDocument.PrintPreview
ActiveDocument.ClosePrintPreview

will have the same effect.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Skeddy wrote:
I hope somebody can help me.

I have a document with field cods in it which are linked to the
document properties.

In the document I have put a macro which opens up the document
properties dialogue box to let you input the information, the
fools it into updating all of the field codes by printing page 0.
Not elegant I know but I couldn't find a command to update all of
the field codes.

The code is:

Application.Dialogs(750).Show

Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages,
Item:= _ wdPrintDocumentContent, Copies:=1, Pages:="0",
PageType:=wdPrintAllPages, _
ManualDuplexPrint:=False, Collate:=True,
Background:=False, PrintToFile:= _
False, PrintZoomColumn:=0, PrintZoomRow:=0,
PrintZoomPaperWidth:=0, _ PrintZoomPaperHeight:=0

The only problem is that once the macro has run, whether it is
from within the document or from a button on the toolbar, XP will
send the document down to the taskbar if it perceives that
another open application has priority, or was open first.

Is there a way around this ? I have tried everything I can think
of i.e "ActiveDocument.Activate", "ActiveDocument.BringToFront =
True" but nothing seems to work.

I hope somebody can help as it is driving me mad.

Thanks.

Skeddy.




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send To Back, Bring To Front Jake Microsoft Word Help 1 April 7th 07 11:01 AM
just installed front pg. 2003 and can't open it. sprucibug Microsoft Word Help 2 September 5th 05 05:03 PM
Bring text box to the front again Gerd Microsoft Word Help 2 September 2nd 05 04:15 PM
Referencing bookmarks in Word 2003 - how do I NOT bring the font i Tom McCray Microsoft Word Help 1 March 3rd 05 04:46 PM
How do I bring the Word window to front? bh Microsoft Word Help 2 December 14th 04 06:09 PM


All times are GMT +1. The time now is 02:56 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Copyright 2004-2014 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.