Cant change FirstPageTray of Word Document

I am getting below error while assinging the Printer Tray.

System.Runtime.InteropServices.COMException (0x800A1200): Value out of range 
  at crosoft.Office.Interop.Word.PageSetup.set_FirstPageTray(WdPaperTray prop)

here is the code I wrote.

With WordApp.ActiveDocument.PageSetup
                        .FirstPageTray = 261
                        .OtherPagesTray = 261
End With

I am using Office Word Interop in my win application.

Thanks,

Irfan Shaikh
0
Utf
12/22/2009 4:55:01 PM
word.vba.general 1023 articles. 1 followers. Follow

1 Replies
2986 Views

Similar Articles

[PageSpeed] 2

You may find some information at 
http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=183 that will 
help.

-- 
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com

"Irfan Shaikh (irfan.shaikh@genmills.com)" 
<IrfanShaikhirfanshaikhgenmillscom@discussions.microsoft.com> wrote in 
message news:45A359DF-F5B5-46FB-BE2B-8E8A80B537C9@microsoft.com...
> I am getting below error while assinging the Printer Tray.
>
> System.Runtime.InteropServices.COMException (0x800A1200): Value out of 
> range
>  at crosoft.Office.Interop.Word.PageSetup.set_FirstPageTray(WdPaperTray 
> prop)
>
> here is the code I wrote.
>
> With WordApp.ActiveDocument.PageSetup
>                        .FirstPageTray = 261
>                        .OtherPagesTray = 261
> End With
>
> I am using Office Word Interop in my win application.
>
> Thanks,
>
> Irfan Shaikh 

0
Doug
12/22/2009 7:16:46 PM
Reply:

Similar Artilces:

search a data in excel document
Need help to search excel document. For example I have a excel document with my Contacts - name, phone, email and address. I receive a call in my cell and couldn't take it and goes to miscall. That number is not already saved in my cell. I need to know who is this, just in case, in my Contacts. Is it possible by using a phone number to findout the other details? You can do this several ways: a FIND macro match/index formula -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "MySuxs" <MySuxs@discussions.microsoft.com> wrote in message ne...

Open Word Document in Internet Explorer
Hi, Previously i have word viewer 97 installed, when i open the word document in the Internet Explorer, it is able to open inside the browser. Anyway, after installed with word viewer 2003. The features of "Browse in Same Window" under folder options for .doc type are disabled. Anyway to have the same features where the word document is able to open inside the Internet Explorer instead of opening using the word viewer 2003 program? Thanks. ...

Excel claims exclusive file may have been changed on save
Every time I work with one particular spreadsheet, I get a dialog indicating that the file may have been changed by another user whenever I try to save the workbook. - I have exclusive access to this file. - I am the only person making changes to the file. - There are no macros in this workbook. - My machine checks out as free of viruses and spyware. - I am at my wits end! Have a look at this KB Article "The file may have been changed..." error when you save workbook to network server in Excel 2002 http://support.microsoft.com/default.aspx?kbid=324491 Myrna Larson also rep...

Change Purchase Order Entry Screen to lookup by Vendor Name
Allow users to either use Vendor Name or Vendor ID lookup at PO entry screen. Many times Buyers know the Vendor Name - not Vendor ID. This change will make PO entry easier. Users should also be able to change vendor before PO record is saved. Currently PO is saved once user tabs off PO Number - If buyer decides to change vendors or inadvertantly enters wrong vendor - they have to delete PO record and start over. This suggestion comes from customer w/4 Buyers who create 50 - 70 PO's per day. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the su...

Publisher 2003 special size documents not printing properly in 200
We just upgraded to Publisher 2007. Our documents appear the same on the screen when opened but when in print preview they default to different size paper. We are using special size documents (4.26 X 5.75) when we notice this happening. They all default to 8 1/2 X 11. Is there anything we need to do to convert to 2007? Thank You for any help. A bit of a guess here: Open the file, select File, Print setup and input the paper size of choice. Be sure to do a Save to retain the settings. -- Don - Publisher 2000� Vancouver, USA "Ginger" <Ginger@discussions.microsoft.com...

Where is the thumbnail view in Word 2010?
Where is the thumbnail view in Word 2010? What operating system are you using? If using Windows Vista or Windows 7 then you'll see a "Save Thumbnail" option in the Save As dialog box at the bottom. Note this option is application specific. Once you enable/disable, it will apply to all documents. If using Windows XP then click the File tab to open Backstage view. Click Info if necessary and in the Properties pane on the right, click Properties and then click Advanced Properties. You'll find the thumbnail option on the Summary tab. As an additional note, if ...

Word merged with Access
I am using both Word and Access 2003. When I merge a Word Letter with Access, sometimes not all of the queries show up, in the drop down box, to link the letter with. Does anyone have any ideas of why this happens? Is there a way to make all of the queries show up? Are the queries limited to a certain number? I would appreciate any help or ideas that you can give me. Aurora Aurora Without more information, I can only guess... Any chance any of those queries that are not showing up are NOT "select" queries (i.e., they are Make Table, or Delete or Insert queri...

Word 2008 for Mac is buggy!
I have been using Word 2008 for the Mac and I am finding one very annoying bug: whenever I click on Tools, the document window disappears, the tools window opens and then the document window reappears behind the tools window. The animation of the opening tools window is not smooth, either.<br> <br> Has anyone else had problems like this. In article <ee8c802.-1@webcrossing.caR9absDaxw>, JLev@officeformac.com wrote: > I have been using Word 2008 for the Mac and I am finding one very annoying > bug: whenever I click on Tools, the document window disappears, the tools ...

hyperlink from publisher to ms word
why the hyperlink from publisher to ms office ( word ) cannot open. What hyperlink? Are you trying to import a Word document? -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "bujang" <bujang@discussions.microsoft.com> wrote in message news:590B9E1B-D310-43AC-858B-91FC4B137FE0@microsoft.com... > why the hyperlink from publisher to ms office ( word ) cannot open. ...

How to change menu text font for MDI app?
I have a MDI app written in MFC. I need to change font for main frame, menu text, status text, and child frame. What is the best way to enumerate through all those controls/frame windows to change font? Thanks. Michael I would have them each change their own fonts in response to a broadcasted message. http://www.codeproject.com/docview/Broadcaster.asp I am assuming that this happens after all the objects have already been created (or else you would have been doing this in the initialization code of each class), so if is because of a user setting, I would save the setting, then broadc...

Word Cells into Excel Cells
How does one import a cell formatted Word file *.doc into cells within Excel *.xls. Any help is much appreciated. ...

Word 2003 vs Word 2007 and XML
I was wondering if anyone was familiar with the way Word 2003 worked as far as direct formatting goes vs. 2007 and the XML background. It is my understanding that if you used direct formatting in Word 2003 instead of using styles, it created problems with corruption because Word 2003 would put a a code before and after each and every character selected. For example, if someone had a document they received in Courier New that was 50 pages long and they selected the entire document and changed the font to Times New Roman (TNR), every character throughout the document would have a...

how do I scan a document and save it to a JPEG format.
I am try to scan a document to upload to a web site. I have ms publisher,word xp and acrobat reader.They tell me that I need to save it to JPEG format. How do I do that Publisher isn't really the tool to do this in. What software came with = your scanner? It's musta came with some basic image thingie...most do. "carole" <carole@discussions.microsoft.com> wrote in message = news:0FA226DD-CF51-46FE-B308-49C77C89A506@microsoft.com... | I am try to scan a document to upload to a web site. I have ms = publisher,word=20 | xp and acrobat reader.They tell me that I need t...

can not send my attachments from microsoft word
was reading others problems, i have a free trail of norton on computer, could this be the problem? and if so is there away to change setting so i can have full use of my computer with out loseing protection? thanks "brit_minor" <brit_minor@discussions.microsoft.com> wrote in message news:1C41CDA9-DB66-4C63-9580-53246A811F5A@microsoft.com... > was reading others problems, i have a free trail of norton on computer, > could > this be the problem? and if so is there away to change setting so i can > have > full use of my computer with out loseing pro...

WORD: Table of Contents with latin numeration
If have got a document dividedin sections. The first sections use latin page numbering and the rest normal arabic numbering. For each section this is working all fine. The only trouble appears when I create the TOC. The reference to the page numbers of those sections that use latin page numbering appears with arabic numbering. THe example will surely clarify the problem: It appears as ****************** Table of contents..................................2 Foreword ...................................4 Summary ...........................................5 1 Introduction ......................

Changing Remote Website from one Hosting account to another
OK So I am working on several sites at once for people. One site is up and I don't have any issues with it. Thanks to this forum :) Both of these sites are hosted via Greengeeks.com and both sites show Frontgpage server extentions are installed. Both of these hosting accounts are for different sits, have different passwords, websites, etc. So two websites, 2 hosting accounts. The problem that I am having is when I am trying to publish saharaarabians.com, it wants to go to the site I have done previously, and when I enter http://saharaarabians.cominstead, it gives me an ...

Add Last Edited Field to Document
Hi, I would like to know if there is a way for a non-developer to add a field for "last edited by" to a visio document. I need something that would update automatically every time a document was updated. I found insert Creator, but what I really need is to insert UserName, but apparently UserName can only be used through VBA scripting. Any help would be appreciated. Thanks, Ron Unfortunately that feature is not available and must be coded. Al "rongleclair" <r1ec1air@c0mcast.net> wrote in message news:46csa0pttk4ko1hcvjhvuroqpp5tigv2rj@4ax.com... > Hi, > >...

Word 2008 running at 80% CPU
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Word 2008 running at 85% CPU, I found in other forums, if I turn the Grammar Check off, the CPU goes back to normal, but it keeps with the same crazy fan issue. Help me please!! I hope there is a fix for it soon. Can't remember where I picked this up, but in Preferences, turn off Live Word Count is reported to reduce CPU wasted. Appears to work for me (but have not done any real experiments to test ... last week the laptop battery lasted while writing most of the the entire transatlantic flight, so it must have wor...

Copy data from Word macro to excel
I am working on a combined Word and Excel sheet (Both 2000 version) What I am trying to do is capture information in Word in an Userform The information that is entered in the form is then used to fill out word document that can be send to a customer. However this information also needs to be entered into an excel sheet currently that is done manually. But I would like to automate that wit a macro. The data that is being captured is in the following form: -If bolOKButtonPressed Then WordBasic.SetDocumentProperty "ProjectTitle", 0 UserForm1.ProjectTitle.Value, 2 WordBasic.SetD...

Insert Multiple Pages from Word in Multiple PowerPoint Slides
I have a 10-page Word document (2003) that I want to insert into PowerPoint (2003) While in PP, I went to Insert > Object and then browsed to find the doc. and then I inserted it. But it only inserts the first page of the Word. doc. into the 1st slide. I want it to insert 10 pages into 10 slides. What can I do to insert all the pages? ANY help would be greatly appreciated, Karen In Word, File, you have Send to...PPT If you have use the Style, y'll get one slide per Style part "Karen" <Karen@discussions.microsoft.com> a �crit dans le message de news: F1D7D2...

Outlook 2002 blocks me from using Word 2000 as e-mail editor
The area in tools that allows me to choose Word as my default e-mail editor is blocked out and I am unable to check this. Is there a fix to allow Outlook 2002 to see my Word 2000 or will I need to buy Word 2002 in order for this to happen? Thank you in advance for any help that you could give in this area. Rich Prouty prouty@pobox.com ...

New 10-9-07 Office update Danger!! Word erased from HD!
Help!! I just downloaded the Mac Office update (the one issued on 10-9-07) through the Microsoft Auto update app, and the updated died in mid- update with an error message saying that the updated encountered an "unknown problem" and could not finish the update. I then clicked on the Word icon on the Dock to see if Office was still functional, and to my complete surprise, Word failed to load and displayed an error message I've never seen before that stated "application not authorized on this platform." Immediately afterwards, the Word icon on the Mac Dock went gray an...

Can't get Word Mail Merge to find my Excel file of names and addre
I can't get my excel file to show up in the Select Data Source window. I clicked on "New Source" then selected ODBC DSN, selected Excel File, and got a Select Database and Table screen with no options for me, except ack and Cancel. I'm sure I'm doing something wrong, can anyone help? Thanks. Marilyn Collins Did you navigate [using the Directories list] to the folder where your Excel file is stored? Double-Click the folders following the path to that directory. Once you get to a folder containing Excel files they will appear in the left list of Database Nam...

Import iWork Pages 'Page Layout' into Word 'Publishing Layout'
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have several publications produced in iWork Pages using Pages Layout. As a new convert to Office 2008 I need to get these publications into Word Publishing Layout so they can be updated and published. <br><br>I can save the Pages version as a Word Document but then it appears as a basic word document without the ability to use the tools in Publishing Layout. <br><br>Is there a simple way to 'import' the document into Word Publishing Layout? Have I missed a simple step!? <br&g...

WORD: Change default font, paragraph and line spacing
Running Windows 7 Pro with Office 2007 Enterprise. I need to change the default font to Tahoma; line spacing to single; with no paragraph space on normal style paragrah for new all documents. I have been doing this for years. Open Font Dialogue Box - set font size etc and clicked the dault button and OK. Easy as falling off a log. The same with line space and paragraph spacing setting - Open Paragraph Dialogue box - change settings and click default. This is not working on my Windows 7 HP Notebook. I then thought I would change the Normal Style and set it "For all docum...