I resolved the issue on my own. Apparantly the .MoveUp and .MoveDown commands don't work when word is running as a background process. By making all modifications to the table on a cell basis and using .MoveLeft and .MoveRight commands only, I was able to do what I needed.
I rearranged the code a little but to try and resolve the select table error and now I get this error:
"OLE Idispatch exception code 0 from Microsoft Word: The SelectRow method or property is not available because some or all of the object does not refer to a table..."
Any idea what issue this...
Mike,
Thanks for the reply.. I commented out some code so that it runs exactly as I presented it and you know, I don't get any error either!! Here is the code that I run when I get the error, it replaces the 2nd <snip> and below. When I get to the tables(1).select command it definitely gives me...
When I run the code with the .visible property set to .T. and Word runs in the foreground everything works fine but with the .visible property set to .F. I get the following error when it gets to the last line of code shown below:
"OLE IDispatch exception code 0 from Microsoft Word: The...
I wrote an instant messaging client using VFP which issues net send commands. It has a message history buffer, user names to send to, pre-written commmon messages and a resend last message button.
Kind of stupid but since we can't use real IMs at work this was a convenient way to send messages...
Hi Rob,
I am trying to utilize your code and am getting a "Subscript out of range" error but I have no idea why. My project is to build some combo boxes after a user clicks on a button. Then I want to assign some code to one of the combo boxes after it is created. For the example line of code I...
Hi,
I am trying to use something along the lines of
oWord.Selection.ParagraphFormat.TabStops.Add(0.75 * 72)
oWord.Selection.ParagraphFormat.TabStops.Add.Alignment = 2
to create a tabstop in word and then change it to a Right Tab from the default tab alignment. I am not having any luck. I know...
You nailed it!! thanks!!!
Why the settings go 0,1,3 is beyond me!
A probably naive question.. How do you find the values of the wd__________ variables in Word?
Thanks,
Chad
Hello,
I have found some great threads on here pointing to good links on Microsoft's website which gave me a lot of information on how to control Word from FoxPro but I am having one problem.
I am trying to set the vertical alignment for text in a particular cell in a table to bottom from top...
I have a foxpro program which opens excel and creates a spreadsheet, populates it with data and then does some formatting. I am also trying to build some pulldown selection boxes (Data -> Validation to make it in Excel).
Please see the snippet of FoxPro code we have written below. The .ADD line...
We have the two normal commands for making a sheet visible and hidden in VoxPro:
XLApp.ActiveSheet.Visible = .F. <- Make it hidden
XLApp.ActiveSheet.Visible = .T. <- Visible
But there is also the Visual Basic command (coded in Excel) you can use of:
Sheets("Sheet1").Visible =...
Geoff,
While this looks like the solution I have found that unless you add a ActiveWorkbook.Save as the last line of the BeforeClose routine that the user can choose to not save changes before closing the workbook and thus when they open the workbook next time and disable macros they will find...
I have a word document with an excel worksheet embedded in it via the INSERT -> OBJECT -> EXCEL WORKSHEET commands. How do I select and write data to this excel object that is inside a word document?
I have used XLApp.<blah> and WordApp.<blah> commands but how do I get at the Excel app inside a...
ETID,
I had previously tried your solution but once the person saves the excel file then I am sunk because the re-enabling of the locking down of the workbook happens on close which is after the file is saved. So when you reopen the file it is no longer locked down.
Perhaps there is a way to...
Is there a way to check whether someone has selected the "Enable Macros" option and make it so that your excel workbook won't open if macros have not been enabled?
Thanks,
Chad
Hey,
Since you gave me tons of help before, I am afraid you are getting stuck with another Combobox question.
I have a combobox called ExistIIP1 and when a user inputs their own custom ExistIIP1.Text value, I want the ExistIIP1.Value to equal some text I specify. In this example I am using the...
Hi Skip,
Thanks for the help. I tried what you gave me but I am getting a Permission Denied error when I try that option.
It is frustrating that a change from a 1 column combobox to a 2 column combobox (col 1 is Text and col 2 is Value) has turned out to be such a headache in how you handle...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.