PC Review


Reply
Thread Tools Rate Thread

Bookmarks in Footer filled from Access but doc NOT in PRINTVIEW ?

 
 
=?Utf-8?B?TWFyY1ZkYg==?=
Guest
Posts: n/a
 
      4th Jun 2005
With the following commands Bookmarks are filled out in the footer of a word
doc from within access
but the document is shown in normal view.
I want it shown in Print View but even with the following code WORD keeps
Normal View ?
What is the solution ?
Thanks


Set oApp = CreateObject("Word.Application")
With oApp

.Documents.Open (strInputFile)
.ActiveDocument.Bookmarks("InvName").select
.Selection.Text = "test naar bookmark in footer"
.ActiveDocument.Bookmarks("InvNameBody").select
.Selection.Text = "test maar dan naar bookmark in bidy"

End With

With ActiveWindow.View
.Type = wdPrintView 'select page/print layout view
' .Zoom.Percentage = 100 'set the display zoom to 100%
' .FieldShading = wdFieldShadingWhenSelected 'set the field shading
preference
' .ShowFieldCodes = False 'turn off field code display
'.DisplayPageBoundaries = True 'Turn on white space between pages
'End With


oApp.Visible = True
 
Reply With Quote
 
 
 
 
Alex Dybenko
Guest
Posts: n/a
 
      4th Jun 2005
Try:
With oApp.ActiveWindow.View
....

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com




"MarcVdb" <(E-Mail Removed)> wrote in message
news:E873BADD-BFE8-496D-A490-(E-Mail Removed)...
> With the following commands Bookmarks are filled out in the footer of a
> word
> doc from within access
> but the document is shown in normal view.
> I want it shown in Print View but even with the following code WORD keeps
> Normal View ?
> What is the solution ?
> Thanks
>
>
> Set oApp = CreateObject("Word.Application")
> With oApp
>
> .Documents.Open (strInputFile)
> .ActiveDocument.Bookmarks("InvName").select
> .Selection.Text = "test naar bookmark in footer"
> .ActiveDocument.Bookmarks("InvNameBody").select
> .Selection.Text = "test maar dan naar bookmark in bidy"
>
> End With
>
> With ActiveWindow.View
> .Type = wdPrintView 'select page/print layout view
> ' .Zoom.Percentage = 100 'set the display zoom to 100%
> ' .FieldShading = wdFieldShadingWhenSelected 'set the field shading
> preference
> ' .ShowFieldCodes = False 'turn off field code display
> '.DisplayPageBoundaries = True 'Turn on white space between pages
> 'End With
>
>
> oApp.Visible = True



 
Reply With Quote
 
=?Utf-8?B?TWFyY1ZkYg==?=
Guest
Posts: n/a
 
      6th Jun 2005
Thanks Alex.
However I believe I interpreted the problem maybe wrongly.
The document opens all right; the boookmark has been replaced;

HOWEVER at that point the document is displayed and the cursor is positioned
at the replaced bookmark (showing the current date) which is all right.
But then the footer has been opened and remains open.

1) I want to close the footer section entirely and show the document in
print view.
But I don't know how......
2) When i manually close the footer section from within word, the document
still stays in normal view or outline view....It seems to ingore my printview
command !

I am totally lost here...as I have been searchin the internet for a solution
for hours but can't find a clue to solve it.

here's the code.
With oApp
.Documents.Open (strInputFile)
With oApp.ActiveWindow.View = wdPrintView
End With
If .ActiveDocument.Bookmarks.Exists("ORDefaultORReferBottom") = True
Then
.ActiveDocument.Bookmarks("ORDefaultORReferBottom").select
.Selection.Text = Now()
End If
With oApp.ActiveWindow.View = wdPrintView
End With
End With

 
Reply With Quote
 
Alex Dybenko
Guest
Posts: n/a
 
      7th Jun 2005
ok, i see
i think the best way to find this - while your proc stops - start recording
macro in word, make document looking whatever you like and then see what
code word generated. remeber i made the same once, but do not have my code
around

--
Alex Dybenko (MVP)
http://Alex.Dybenko.com
http://www.PointLtd.com



"MarcVdb" <(E-Mail Removed)> wrote in message
news:724F0171-3F1A-44A8-91B9-(E-Mail Removed)...
> Thanks Alex.
> However I believe I interpreted the problem maybe wrongly.
> The document opens all right; the boookmark has been replaced;
>
> HOWEVER at that point the document is displayed and the cursor is
> positioned
> at the replaced bookmark (showing the current date) which is all right.
> But then the footer has been opened and remains open.
>
> 1) I want to close the footer section entirely and show the document in
> print view.
> But I don't know how......
> 2) When i manually close the footer section from within word, the document
> still stays in normal view or outline view....It seems to ingore my
> printview
> command !
>
> I am totally lost here...as I have been searchin the internet for a
> solution
> for hours but can't find a clue to solve it.
>
> here's the code.
> With oApp
> .Documents.Open (strInputFile)
> With oApp.ActiveWindow.View = wdPrintView
> End With
> If .ActiveDocument.Bookmarks.Exists("ORDefaultORReferBottom") =
> True
> Then
> .ActiveDocument.Bookmarks("ORDefaultORReferBottom").select
> .Selection.Text = Now()
> End If
> With oApp.ActiveWindow.View = wdPrintView
> End With
> End With
>



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
bookmarks in footer of Word doc not filled by ACCESS =?Utf-8?B?TWFyY1ZkYg==?= Microsoft Access VBA Modules 1 4th Jun 2005 12:01 AM
Bookmarks (in FOOTER of WORD doc) not filled from within ACCESS =?Utf-8?B?TWFyY1ZkYg==?= Microsoft Access 0 3rd Jun 2005 11:12 PM
Add bookmarks in header/footer =?Utf-8?B?S2luZCB3cml0ZXIvdXNlci9wcm9ncmFtbWVy?= Microsoft Word Document Management 1 7th Dec 2004 07:55 PM
Putting Bookmarks in Header and Footer =?Utf-8?B?S2luZCB3cml0ZXIvdXNlci9wcm9ncmFtbWVy?= Microsoft Word Document Management 1 7th Dec 2004 07:55 PM
AutoText Entry in Footer with Bookmarks Carrie Microsoft Word Document Management 2 14th Jan 2004 07:12 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:27 AM.