Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 335
  • Last Modified:

How do I open a Word document in landscape orientation using Shell command

Using VBA in MS Access, I am attempting to open a Word document. The Word document is a table that I want to appear in landscape orientation. The Word document has been created and saved using VBA.

Dim path as string
path = MyDoc.doc
Shell path, vbNormalFocus
0
jbotts
Asked:
jbotts
  • 3
  • 2
1 Solution
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Not sure that can happen using Shell.  May need to go back to the approach in your other Q

mx
0
 
jbottsAuthor Commented:
I think you are correct. I was able to do it with VBA.
Thanks
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
cool!

Were you ever able to get what I posted there to work? See ... I would have suggested Shell right off ... but for some reason, I suspect you wanted to use that approach for some specific reason.

mx
0
 
jbottsAuthor Commented:
Shell works great in that it is so fast, however, there are certain attributes for the Word document created with VBA, that cannot be added unless the Active document is visible. The only way that the Shell command can be used it to open the document once with VBA, close it and then reopen it with Shell. That is not cool, so I am stuck with the VBA in those documents created with VBA. I appreciate your help.
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
ok ...
Not sure why Shell is that much faster ...

mx
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now