How JustAnswer Works:

  • Ask an Expert
    Experts are full of valuable knowledge and are ready to help with any question. Credentials confirmed by a Fortune 500 verification firm.
  • Get a Professional Answer
    Via email, text message, or notification as you wait on our site.
    Ask follow up questions if you need to.
  • 100% Satisfaction Guarantee
    Rate the answer you receive.

Ask NewITZone Your Own Question

NewITZone, Computer Enthusiast
Category: Microsoft Office
Satisfied Customers: 90
Experience:  I have been using Office Pro for 10 years and implemented applications for business use.
Type Your Microsoft Office Question Here...
NewITZone is online now
A new question is answered every 9 seconds

This is a question concerning MS Word VBA: Another expert

Customer Question

This is a question concerning MS Word VBA:

Another expert gave me the following code which works well:
'A quick macro scratch pad created by Greg Maxey
Dim oDoc1 As Word.Document
Dim oDoc2 As Word.Document
Dim oRng As Word.Range
Dim i As Long
Set oDoc1 = Documents(1)
Set oDoc2 = Documents(2)
'Where are we in the first document
i = ActiveDocument.Range(0, Selection.Paragraphs(1).Range.End).Paragraphs.Count
'Go to other document
Selection.Collapse wdCollapseStart
End Sub

The 2 documents references above are virtually identical, so when a user is viewing document 1 and pressed my command button, the user is taken to the exact same location in document 2.

However, Document 2 now has a split window -- with the Document being in Frame 2, and Frame 1 being empty. I couldn't figure out how to get the above code to now function. I need the code to function the same way before the having document 2 had 2 frames.
Submitted: 4 years ago.
Category: Microsoft Office
Expert:  Lindie-mod replied 4 years ago.
Hi, I’m a moderator for this topic and I wonder whether you’re still waiting for an answer. If you are, please let me know and I will do my best to find an Expert to assist you right away. If not, feel free to let me know and I will cancel this question for you. Thank you!
Customer: replied 4 years ago.
I had been, but I was able to figure it out eventually -- so feel free to cancel the question. Thanks!