|
Once again, thank you very much for your input. I searched the registry for a while and looked at the properties of the respective COM object, but could not think of any way to change its behaviour in a positive way. I also had a look at the MS patent article, which was very interesting but also confusing I don't think they already implemented this new technique in one of their OS, right?
Anyway, I got an idea how to improve my algo: The DataStream Object offers the ability to remove instruments during runtime. So I can filter instruments out while analyzing. Maybe there are other way too.
At least I have to know now where to improve my application - once again, thank you very much!
|
|
|
|
|
hi all,
How someone can help with this question. I am trying to write a number of tables to Word. I can create the document and application and add a table, my problem arises when I want to seperate them. I believe this is something to do with the "range". The first table is set at range (0, 0), I then try to reset the range, or try to insert some blank lines and reset the range. I have also tried to create a new range for each table but I get the same result everytime which is the new table gets inserted into the first cell.
I have done some serious brain damage reading MS help on ranges and how to reset them and also moving selections up on and down- nothing seem to work. Utimately I have 8 tables and I want one table on 8 seperate pages.
thanks for any help you can give
Imports Microsoft.Office.Interop.Word
Imports System.Runtime.InteropServices
Public junk As New DataTable
Private Sub WriteTables()
Dim oApp As Application
Dim oDoc As Document
'Start a new document in Word
oApp = CType(CreateObject("Word.Application"), Application)
oDoc = oApp.Documents.Add()
' Clear out any existing information.
' oDoc.Range.Delete()
' make the current documents the ActiveDocument
oDoc.Activate()
Dim rng As Range = oDoc.Range(0, 0)
rng.Font.Name = "Verdana"
rng.Font.Size = 16
Dim tlb As Table = oDoc.Tables.Add(Range:=rng, NumRows:= junk.Rows.Count, NumColumns:= junk.Columns.Count)
tlb.Range.Font.Name = "Arial"
tlb.Range.Font.Size = 20
With oApp.Selection
.SetRange(tlb.Range.End + 1, tlb.Range.End + 1)
.Collapse(WdCollapseDirection.wdCollapseEnd)
End With
' Dim i As Integer
' For i = 1 To 5
' oApp.Selection.MoveDown()
' Next
' rng = oApp.Selection.Range
' rng.SetRange(Start:=0, End:=8)
' rng.SetRange(Start:=rng.End + 3, End:=rng.End + 3)
Dim tlb1 As Table = oDoc.Tables.Add(Range:=rng, NumRows:=6, NumColumns:=6)
oApp.Visible = True
End Sub
|
|
|
|
|
This page[^] shows how to add a new table at the end of a word document.
And also try adding a new paragraph for each new table - this VBA code creates a new document with two tables:
Sub Test()
Dim NewDoc As Document
Dim NewTable As Table
Set NewDoc = Application.Documents.Add(, , , True)
Set MyRange = NewDoc.Content
MyRange.Collapse Direction:=wdCollapseEnd
Set NewTable = NewDoc.Tables.Add(Range:=MyRange, NumRows:=6, NumColumns:=10)
NewTable.Borders.OutsideLineStyle = wdLineStyleTriple
NewDoc.Paragraphs.Add
Set MyRange = NewDoc.Content
MyRange.Collapse Direction:=wdCollapseEnd
Set NewTable = NewDoc.Tables.Add(Range:=MyRange, NumRows:=6, NumColumns:=4)
NewTable.Borders.OutsideLineStyle = wdLineStyleTriple
End Sub
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
I have a COM dll when i update interface manually my application crashed. but when we update the interface by wizard its working properlly. can any one tell me why this happend and if i want to update any existing interface manually what should i do?
Thanks in Advance
Ashish Chandrakar
|
|
|
|
|
You're clearly doing something wrong when you're manually editing the idl.
The compiler doesn't distinguish between manually added and wizard added code.
chandrakar ashish wrote: can any one tell me why this happend
You will have to post the part which you manually edited.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
I think you are missing some thing while updating idl file manually.
Can you please provide some ifo as what you are trying to update. and when is your application crashing.???
|
|
|
|
|
As the other answers have suggested, you're cleaarly doing something when updating the interface manually, so why not update the interface both manually AND by using the wizard, and seeing what the differences are between the IDL generated by the two mechanisms? That should help you realise what you're missing out...
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi all,
Thanks a lot for your help in advance.
I am doing a Mail Merging Application. I can get all data from the source (database, file or anything) and using mail Merge fields in Word Document from C# code, I open up the word which is merged with data from database.
MS Word Document Opens –
--- should this be open in IE
--- Or should this be open as ordinary MS Word on Desktop
The problem is if I open it anyway, I loose all control over the Word Document which is opened. I don’t want to do that. I want to keep control over it and allow the Users to update the document with some standard messages which we have in the project. What that means is, the messages will be selected and those messages selected will be put at some point where cursor is kept in the document.
So, when mail merging happens
MS Word Document is opened.
A pop up with standard messages is opened.
User selects the messages he/ she wants to insert into the MS Word Document which is opened.
For these things to happen, I should have control over the MS Word Document which is opened on the client side. Do selection of the messages and populate in Word document (this is my understanding, is there any way to do it easily).
The Issues are:
I need a way to open the MS Word Document in a controlled manner where I can still control the User editing or help user in editing when he / she clicks on my standard messages and wants them to populate on the MS Word Document.
How can I save the MS Word document and make sure that user is not saving it locally and has to upload it again to save it on server.
I Hope I am clear in explaining the situation, please find the attachments which show the MS Word Doc and the popup on side .
|
|
|
|
|
Here is the IDL definition
[
object,
uuid(DAFB7D76-0158-452F-8FD0-FF97A683DEA3),
helpstring("ITest Interface"),
pointer_default(unique)
]
interface ITest : IUnknown
{
[helpstring("method GetString")] HRESULT GetString([out,retval] BSTR* pVal);
};
[
uuid(E768DC15-A19B-407C-ACF9-C420D6FDB1BE),
version(1.0),
helpstring("TestServer 1.0 Type Library")
]
library TESTSERVERLib
{
importlib("stdole32.tlb");
importlib("stdole2.tlb");
[
uuid(788571BD-030B-49CC-8C0A-2DF74E58331A),
helpstring("Test Class")
]
coclass Test
{
[default] interface ITest;
};
};
The ATL COM Library uses APARTMENT threading model.
And the VB.NET windows service code fragment
try
Dim obj As New TESTSERVERLib.Test
Dim s As String
s = obj.GetString()
Catch ex As Exception
WriteToLog(ex.Message)
WriteToLog(ex.InnerException.ToString)
End Try
When the code executes the following error occurs:
Unable to cast COM object of type 'TESTSERVERLib.TestClass' to interface type 'TESTSERVERLib.ITest'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{DAFB7D76-0158-452F-8FD0-FF97A683DEA3}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).
Object reference not set to an instance of an object.
But the same code works in VB.NET forms application.
Can anyone please explain the reason.
|
|
|
|
|
I am trying to add an extra property page to a device in Windows 7 Devices and Printers. I am following
http://www.microsoft.com/whdc/device/DeviceExperience/DevPrintFolder-Ext.mspx
and
http://msdn.microsoft.com/en-us/library/cc144106(VS.85).aspx
I can add a shortcut item to "right click" menu of the device successfully; however, the extra property page does not show open in device Properties window. If I follow the same steps to add the extra property page to a .test file type, it works and I can see the extra property page shows up. It seems that the COM dll for the property page is fine. Any one successfully completed similar things before?
The following is what I added in Registry:
HKEY_CLASSES_ROOT\CLSID\{Page 1 Property Sheet Handler CLSID GUID}\InProcServer32
(Default) = C:\MyDir\MySheet1.dll
ThreadingModel = Apartment
HKEY_CLASSES_ROOT\DeviceDisplayObject\HardwareId\Device hardware id\shellex\PropertySheetHandlers\MySheet1
(Default) = {Page1 Property Sheet Handler CLSID GUID}
modified 23-Dec-22 21:01pm.
|
|
|
|
|
hello ,
Button on Toolbar not showing chervon effect. When i drag toolbar for chervon then first button is overlapp on all buttons and no image is added into chervon list..So may be problem and which function called when i drag button on toolbar.
Thansks
Am
|
|
|
|
|
maybe one day I could help you to solve the problem.
|
|
|
|
|
Hi Guys,
I have been searching for a SMPP lib for a while now, I finally stumbled on a dll, created by a Romzy, but there wasnt any samples or instructions for implementation, nor have I been able to trace the developer, I have tried using the DLL with little I could gather from the SMPP protocol definition, but in binding to a SMSC, it includes a Sendbindtranceiver with requires (index as short, hsocket as integer, SMPP_PDU_Bind_Transmitter), what I'd like to know is, anyone understand or can suggest what the index might mean or how that data type (short) can be represented and what does hsocket mean.
I do understand that it may be impossible to understand without seeing the code, but I m snatching at straws right now.
Any help or suggestions will be welcome.
|
|
|
|
|
Hi..
You are using a third party com or if you create your own api? Please let me know the detail.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Hi, Thanks for the quick response.
I am using a third party com dll, but cant seem to bind to the smsc.
I will be grateful if you have a Smpp library preferably com, that I can use.
|
|
|
|
|
Well... You have 2 options (a) Create your own api, (b) Use third party api.
let me know that you only send 160 char message or Hex like .. Wap push, logo, mono ring tone etc
you also must get the smsc acknowledgment an Alphanumeric message submit ID right?
Md. Marufuzzaman
|
|
|
|
|
Thanks Marufuzzaman, I am not knowledgeable enough to build my own API, unless I can get a push in the right direction or can get hold of manuals in that regard.
I only need for it to send 160 char. to the receipient, no need for any acknowledgements or response from the receipient, just sending the message(s).
Any idea I can use?
|
|
|
|
|
Hi harrisyn,
So you will use a 3rd party api. Try the following:
http://www.activexperts.com/xmstoolkit/
If you interested to create SMPP api, I think I can help you.
Thanks
Md. Marufuzzaman
Md. Marufuzzaman
|
|
|
|
|
|
Hay..
Definitely my friends, actually last couple of days I'm trying to create an SMPP api, and it almost completed
I will share this with you my friends.
Thanks
Md. Marufuzzaman
|
|
|
|
|
Wonderful news ,
I'd hate to sound like Oliver Twist, but how soon can you complete it
Waiting expectantly
|
|
|
|
|
I will let you know as early as possible....
Md. Marufuzzaman
|
|
|
|
|
|
Hi Maruf,
Hows it coming, are we allowed peeks?
|
|
|
|
|
Hi
Do you try to convert the SMPP api into a COM+ object.
Thanks
Md. Marufuzzaman
|
|
|
|