Hello Lameid,
I have been testing and the fact is that the problem is that I am complicating too much the code.
I simplified the code to just:
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, "querystorestest", "C:\\Test.xls"
And it works perfectly without creating an excel...
Thank you for your reply lameid,
I am actually working on Access. The goal is to add sheets to a newly created excel file adding the results of various access queries.
I checked the spelling of "querystorestest" (I actually did a copy-paste of the name) but I get the run-time error.
I'll...
Hello,
I am trying to make a code that makes a query, exports it to a new excel file and then makes another query and adds the results in a new worksheet.
I am beginning my code the following way:
Sub EXCEL_TEST()
Dim ExcelPath As String
Dim ExcelSheet As Object
Set ExcelSheet =...
Hello Fumei,
I thought it might be that before getting to the solution, but seems that .TypeParagraph wasn't enough. I used it before, afetr, between lines... I used combinations of 2 and 3 series of .TypeParagraph, but it was useless.
In order to apply the style correctly I had to use the...
Hello,
I finally solved it in a quite strange way...
I duplicated the following structure:
===================================
str = workarray(0)
appWD.Selection.Style = appWD.ActiveDocument.Styles("Heading 1")
appWD.Selection.TypeText Text:=str
'We duplicate this structure because if not the...
Hello PHV,
Thank you for your feedback. Actually, I am eliminating certain lines of the code, due to the fact that they make reference to the values Word uses by default. Centimeters to points is one of those lines, as you migh have seen in my previous post.
The question is that I can't seem...
Hello,
I changed the code according to your instructions (thus, eliminating the WITH structures - loss of efficiency though).
Nevertheless, these lines:
========================
appWD.ListGalleries(wdBulletGallery).ListTemplates(1).ListLevels(1).NumberPosition = CentimetersToPoints(0.63)...
Hello,
I am trying to create a code that takes data from an array (in excel) and creates a word document.
The array might be something like:
Log name
Expense Group 1
Lab 1
Person
Person
Person
Lab 2
Person
Person
Lab 3
Person
Person
Person
Person
Lab 3
Person
Expense Group 2
Lab 1
Person...
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.