Wrox Programmer Forums
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 2nd, 2012, 06:54 PM
Registered User
 
Join Date: Apr 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default VBA code

Office 2010
I have an Excel sheet I want to save as a Word Doc and I need the VBA coding, Coding I used in Office 2000 does not work. Thanks for help
 
Old March 5th, 2012, 01:12 PM
Friend of Wrox
 
Join Date: Sep 2005
Posts: 812
Thanks: 1
Thanked 53 Times in 49 Posts
Default

Hi

Do you want to convert a Sheet to Word document / Insert the Sheet to a Word document. It would be good if you can share the existing code.

Cheers
shasur
__________________
C# Code Snippets (http://www.dotnetdud.blogspot.com)

VBA Tips & Tricks (http://www.vbadud.blogspot.com)
 
Old May 23rd, 2012, 08:46 PM
Registered User
 
Join Date: Apr 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

.ActiveDocument.PageSetup.Orientation = wdOrientLandscape
.ActiveDocument.SaveAs Filename:=Ydesktop
This code convert worksheet to landscape and saves as word document.
I want to add another line of code to save as legal

I thought this might work
.ActiveDocument.PageSetup.Size= wdSizeLegal

But it doesn't
Any suggestions much appreciated
 
Old July 24th, 2013, 01:30 PM
Registered User
 
Join Date: Apr 2011
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks very much --just what I need





Similar Threads
Thread Thread Starter Forum Replies Last Post
Code works in Excel VBA but not Access VBA fossx Access VBA 2 May 21st, 2007 08:00 AM
vba code need in.ssuresh Excel VBA 2 November 29th, 2005 08:40 PM
vba code in.ssuresh Excel VBA 1 November 28th, 2005 05:10 AM
Help with VBA Code KevinN Excel VBA 1 April 22nd, 2005 06:50 AM
VBA code desprate Access VBA 7 April 12th, 2005 08:50 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.