I am having an unique issue and unable to find any resolution online. My company is using an application which uses Pivot table and chart controls from Microsoft office 2003 web components ( OWC 11 )
It worked fine till we use 32 bit version of Microsoft Excel 2013. Now we are planning to upgrade to Office 2016 and since it's an old component it's having compatibility issues.
I tried to replace code ( replace Pivot Table class and Chart classes ) but there are no classes for pivot and charts.
PivotTableClass objPT = new PivotTableClass();
objPT.ConnectionString = connString;
objPT.DataMember = "DataMemberString";
I am not sure how to replace classes from OWC 11 to make it work with MS Office 2016.
Can anyone plz help?
Related
I am looking for using a library in vba microsoft access 2016 to add some picture effects inside an Image object. All the web examples are for Excel, Word or Powerpoint vba, not for Access vba. So I am setting references adding Microsoft Office 16.0 Object Library and Microsoft Excel 16.0 Object Library but code doesn't work with MS Access:
'no declare before ...
Dim IMGTEST As Object
IMGTEST = Forms!frmExportOLE.MonImage.Picture
With IMGTEST.PictureEffects
' Insert a 150% Saturation effect.
.Insert(msoEffectSaturation).EffectParameters(1).Value = 1.5
' Insert Brightness/Contrast effect and set values to -50% Brightness and +25% Contrast.
Dim brightnessContrast As PictureEffect
Set brightnessContrast = .Insert(msoEffectBrightnessContrast)
brightnessContrast.EffectParameters(1).Value = -0.5
brightnessContrast.EffectParameters(2).Value = 0.25
End With
Please, could you tell me what are my mistakes
and probably help me on what kind dll would i declare before.
Regards michel
I have a table called GRN with MS Access Database
as shown below
grn_id (Autonumber)
grn_number (Text)
grn_date (Date/Time)
invoice_number (Text)
invoice_date (Date/Time)
voucher_number (Text)
supplier (Text)
I have created a data set with VB.Net Visual Studio 2012
in the data Set I have created a table adapter and a query
with the following code
SELECT grn_id, grn_number, grn_date, invoice_number, invoice_date, voucher_number, supplier
FROM grn
WHERE (grn_number = ?)
And named it as FillByGRN
In the form I have added the following code
Me.GrnTableAdapter.FillByGRN(dataTable:=Me.DocmanDataSet.grn, grn_number:=finfo.Text)
When I Run The application and Give the textfield finfo a value and click on my button to fill is is not working and stopped on the line of filling the table adapter.
Any Solution Please
Considering the exception you mentioned, you don't seem to have Jet Database Engine driver installed on your machine. Either download and install that driver, or in case you're running against Access 2010 or later, use ACE.OLEDB connection string instead of the old-school Jet.OLEDB.
The connection string looks like this:
Provider=Microsoft.ACE.OLEDB.12.0;Data Source=<Access Database Path>;
Persist Security Info=False;
You can read more about OLEDB connection strings here.
I'm using visual studio 2010 to create a report, the data is being used from a SQL database
One particular set of data is being returned as integers instead of text, therefore I want to be able to do a statement where if the integer is 1 then set it as "Random" if 2 then set it as "Question" for example
I've tried the following but been unsuccessful
=Replace(Fields!new_IssueType.Value,"1","Issue")
=Replace(Fields!new_IssueType.Value,"2","Complaint")
=Replace(Fields!new_IssueType.Value,"3","FM Complaint")
=Replace(Fields!new_IssueType.Value,"4","Rejected")
I'm new to creating these expressions so I apologise if this question is a simple fix.
Try using this code:
=IIF(Fields!new_IssueType.Value = "1","Issue",IIF(Fields!new_IssueType.Value = "2","Complaint",IIF(Fields!new_IssueType.Value="3","FM Complaint",IIF(Fields!new_IssueType.Value="4","Rejected",""))))
The source situation: I have an Notes Application which uses MS Office 2000 under Windows XP. The new situation has to be MS Office 2010 under Windows 7. IBM Notes is 8.5.3FP3.
The old one uses a VBA template to communicate with Notes which works properly. At one time a Notes.NotesUiWorkSpace object is created to open a document, navigate to a richtext item, select all the content (formatted) and copy to the clipboard. Then the clipboard content ist pasted into the Word document via VBA. That works fine.
The same code in the second environment doesn't work anymore. I noticed that the Notes.NotesUIWorkSpace object cannot be instanciated in VBA. No errors, no hints. Only the runtime error when I reference the workspace-object later.
Here is a code excerpt:
' this is a profile document which is filled correctly
Call prof.Save(True, True)
Call prof.replaceItemValue("Form", "Profile")
' setting up the ui
dim WS as Object
set WS = CreateObject("Notes.NotesUiWorkSpace")
Set uiprof = WS.EditDocument(True, prof)
' Set uiprof = WS.currentDocument
If uiprof.editMode Then Call uiprof.gotofield("RT")
Call uiprof.SelectAll
Call uiprof.Copy
Call uiprof.Close
' later on the clipboard will be pasted into the word document
Any ideas what could be the cause here? I am setting up an environment with XP, MS Office 2010 and Notes tonight to check it out that it is not caused by Windows 7.
If the Windows 7 machine is 64 bit, take a look at the answers here. Note that those refer to the COM classes (lotus.), and you are using the OLE classes (notes.), but I believe the 64/32 bit issue applies to both.
I'm in the process of transfering our VBA AutoCAD script to VB.NET but i came across a warning. VB.net 2010 give me a warning that this code is obsolute, and probally won't work with 64 bit.
The program needs to be 64 compatibel because of the problems with our vba file and AutoCAD 2012 & Windows 7 X64. What do i need to use instead of VB6.CopyArray?
If Flipline = True Then
P1 = VB6.CopyArray(Endpoint)
P2 = VB6.CopyArray(Beginpoint)
Else
P1 = VB6.CopyArray(Beginpoint)
P2 = VB6.CopyArray(Endpoint)
End If
According to MSDN documentation for Support.CopyArray:
The Visual Basic 6.0 Variant data type is no longer supported in Visual Basic 2010. The CopyArray function is used by the upgrade tools to copy an Array to or from a Variant array.
To copy an array in Visual Basic 2010, use the Clone, Copy or CopyTo methods of the Array class.
Array.Clone Documentation
If Endpoint is an array, then:
P1 = Endpoint.Clone()