Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Error in MS Word VBA for pagesetup Dialog
HI,
Please Help me in finding cause for an error in following code in VBA for MS Word 2000: Set oApp = New Word.Application With oApp.Dialogs(wdDialogFilePageSetup) .Default = -1 .Execute End With At .Execute following error message is encountered. "the measurement must be between 0" and 22" No where on the web I could find cause for this error. Thanks in advance SRV New York |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Error in MS Word VBA for pagesetup Dialog
Hi ?B?U1JW?=,
Please Help me in finding cause for an error in following code in VBA for MS Word 2000: Set oApp = New Word.Application With oApp.Dialogs(wdDialogFilePageSetup) .Default = -1 .Execute End With At .Execute following error message is encountered. "the measurement must be between 0" and 22" Note: It's better to ask for VBA help in a Word programming group; this group is mainly frequented by end-users. The error message you quote is an error in the Word UI, not a VBA error. It's crops up when a margin setting conflicts with what the current printer driver tells Word is acceptable. It can also be caused by "other things", such as a damaged file. What are you trying to achieve with this code? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Error in MS Word VBA for pagesetup Dialog
Thanks Cindy for you suggestion.!
I was trying to set the default page setup(that of normal template) using that piece of code so that my application do not go cranky with different formats for mail merging documents. Interesting thing is the original document which gives error from this code do not give any error when I try from File- Page Setup - Default button. My code should be doing the same. -SRV "Cindy M -WordMVP-" wrote: Hi ?B?U1JW?=, Please Help me in finding cause for an error in following code in VBA for MS Word 2000: Set oApp = New Word.Application With oApp.Dialogs(wdDialogFilePageSetup) .Default = -1 .Execute End With At .Execute following error message is encountered. "the measurement must be between 0" and 22" Note: It's better to ask for VBA help in a Word programming group; this group is mainly frequented by end-users. The error message you quote is an error in the Word UI, not a VBA error. It's crops up when a margin setting conflicts with what the current printer driver tells Word is acceptable. It can also be caused by "other things", such as a damaged file. What are you trying to achieve with this code? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
#4
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Error in MS Word VBA for pagesetup Dialog
Hi ?B?U1JW?=,
I was trying to set the default page setup(that of normal template) using that piece of code so that my application do not go cranky with different formats for mail merging documents. Interesting thing is the original document which gives error from this code do not give any error when I try from File- Page Setup - Default button. My code should be doing the same. Mmmm. It goes against my grain to "fiddle" with the settings in the user's Normal.dot. Normal.dot really belongs to the user, not the developer... Can you explain in a bit more detail how your "mail merge application" is supposed to function, as far as interfacing with the user goes? Any reason, for example, you wouldn't use a template specific to the project, or just change the page settings for any document used by your application? Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Word 97 in Windows XP to maintain formatting | Microsoft Word Help | |||
Word should allow to 'divide' page by 3 or 4, not just 2 | Page Layout | |||
How can Word display full path of a file in the title bar? | Microsoft Word Help | |||
Does Word have a QuickCorrect/Quick Word option like WordPerfect? | New Users | |||
In Word, how do I surpress headers and footers on page 2 | Microsoft Word Help |