Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
My Word/VBA problem
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00459701
Message ID:
00459749
Views:
17
Hi Della..

That is only going to solve part of the problem. Rolf wants the text to appear at the bottom of the doc/page as opposed to the top...

Rolf, the bottom of a page is a relative thing depending on the number of lines on the page. Depending on your setup, you are going to have to insert lines via the TypeParagraph method of the Selection Object in order to get to the absolute bottom of a page. Once you have those lines, then you can achieve your desired results.

At first, I thought you might be able to insert a new page, go to the new page, and then invoke the MoveUp Method. If you don't have the lines inserted in the first doc, you go to the top.

The solution at first may not seem all that elegant. Don't let that worry or trouble you. Often, VBA/Office programming is a clumsy endeavor at best!!

< JVP >



>I think that this line is giving you fits:
>
.Selection.MoveDown Unit:=wdScreen, Count:=1
>Try changing it to:
>
 #DEFINE wdScreen 7
> .Selection.MoveDown(wdScreen, 1)
>VBA supports Named Parameters, which is that Unit:=wdScreen construct. This allows you to specify the wdScreen is the value for the Unit parameter; you can mix the order of the parameters, and not have to count commas to pass only the seventh parameter (if that's what you need to do).
>
>Try changing the code and see if that works.
>
> - della Martin
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform